Toad World® Forums

If condition in automation script is not working properly (TDP 4.1)

As i say in object, TDP return an error with condition . that’s veryr strange ! condition worked in TDP 3.8.

error message is :

Exception Messages:
If_1 - ‘‘False’’ cannot be converted to boolean.

When using Test button in activity, it’ working !

Toad seems to quote every variables including its own !

Any workaround ?

Franck

Unfortunately (and embarrassingly) the answer is No. I can’t find a work around and the issue is not easy to fix. We definitely know of the issue and have entered QAT-9543 to fix. I think it will take a couple of weeks before I can get a fix in the Beta.

Sorry[^o)]

Hi Debbie !

Good news ! i have found something to do the job !

The returned boolean is quoted when the condition test is char formatted.

I explain :

to_char(current_date(), ‘DDDD’) = ‘friday’ in condition activity return ‘True’ or ‘False’

1 = 1 in condition activity return True so, it works on numeric !

My workaround :

1 -Execute script activity : select to_char(sysdate, ‘d’) from dual (DB Oracle) in result set variable #Test_Jour_SQL#

2 -Condition activity : #Test_Jour_SQL# = 5 return True unquoted

I hope this will help…

Regards.

Franck

Perfect!! That is what I was looking for as a work around.

Hi,

Requirement:

Toad for SQL server. Data compare automation. I want to check if the compare job is successful (with or without differences) and send a success e-mail. If it fails for any other reason, would like to send a separate error email.

Defined the variable in the data compare job COMPARE_JOB_RESULT

Checking it in the IF condition

#COMPARE_JOB_RESULT# = ‘False’

while executing the task, getting the following error

‘False = ‘False’’ cannot be converted to boolean.