Toad Data Point 6.2 using String in If Condition

Hello, in an automation task in Toad Data Point 6.2, I have a variable weekday which is defined as To_char(Current_date(), 'DY'). The result today is 'Sun'. This is working correctly.

Next I have an if..condition.. action which is defined as '#WEEKDAY#'='Sun' then do the remaining tasks. This is failing. From all documentation I'm finding, it appears that this is how it should be done, similar to the discussion post listed below. What am I doing wrong?

It's telling me that there is a mismatched input 'Sun' expecting EOF line 1:2 and that I need to make sure variables are additionally enclosed in single quotes if variables represent a character, which I have done. Lastly it says that "Toad has detected some symbols within the expression indicating you might be using bind variables. Please define the following variable(s):
variable." Is it thinking that '#WEEKDAY#'='Sun' is trying to bind a variable instead of evaluate a variable? I also tried == instead like some other programs, but that didn't work either.

Hi,

For calling a variable defined like this you need to use two ## before and after the variable name, with tick marks around it ’##variable##’ = ’Tue’.

Using a variable created in this way, will not work properly as part of the IF condition, and it will be logged as a defect. To overcome this issue, my suggestion is to define an IF condition without a variable (To_char(current_date(),'DY') = 'Tue').