Toad World® Forums

SQL Variable in Data Point Automation not useable

Hi I am currently trying to pull a variable that is a date from a select statement, which it is pulling the value. but whenever i try to use that variable in Add_days() function or even try to convert it to a string and pull specific characters i get one of the below issues:

expression: Substr('#DF_DATE#', 10)
error: "Toad has detected some symbols within the expression indicating you might be using bind variables."

expression: #DF_DATE# - CurrentDate()
error: Make sure variables are additionally enclosed in single quotes if variables represent
character value ('#variable#') mismatched input '11' expecting ')' line 1:25

expression: '#DF_DATE#' - CurrentDate()
error: Make sure variables are additionally enclosed in single quotes if variables represent
character value ('#variable#') mismatched input '11' expecting ')' line 1:25

Hi Craypob - welcome to the forums. Are you declaring the variable in your automation? That first error is what I see often if I forget to use the 'set variable' or 'set variable value' step.

Here is a quick video - does it recreate your usecase?