Toad World® Forums

If..Condition Check Variable Value Automation


I’m a new user to the automation features in Toad 6.1. I am wanting to setup a automation task where I can run a schema upgrade script only if the database release is only at a certain version. So for example, if database_value=2 execute database upgrade script 3.

I have created a “set_variable” activity that grabs the database release and sets a value of #db_version#. I see that is working as expected. Then I tried using a if…condition statement to check the value of #db_version# but this is where I am stuck. I click on Variables, my #db_release# variable appears, I then click on operators and select “=”, and then I have tried typing “2” or ‘2’ or just 2. I then put a execute script activity inside of the if_condition designer window. When I go to run the automation task I get an error "2/21/2014 9:43:40 AM: If_1 - ‘2=2’ cannot be converted to boolean. "

I know the fix has to be simple, but I’m scratching my head.