Using Toad Automation Unable to run SQL due to Bind Variables?

Trying to Automate a script that requires the use of '&' and in my automation script it errors with:

'Toad has detected some symbols within the SQL indicating you might be using bind variables.
Please define the following variable(s) and Value(s).

Variable name: amp;
Variable name:

This script runs happily in editor but it won't let me run it in automation. Unfortunately the script needs &.

This is slowly driving me mad!

Thanks
J

What version of ToadSS are you using? Also, can you please post your SQL script you’re trying to automate? I would like to see how ‘&’ is used there. Instead of posting you can send script directly to me (igor.manokhin@quest.com). Automation script would be also helpful.

Thanks,

Igor.

We are using Toad for SQL server 5.5.0.1073
I’ve sent the script to yourself

Thanks

I’ve got your SQL script, thank you.

Unfortunately, this is a known issue and we don’t have an immediate solution. The only workaround I can think of is to try to find a way to make replacements outside of SQL script.

Sorry for the inconvenience,

Igor.

Hello,

Sorry to piggy back on this post, but I am running into the same issue and was wondering if there was any update on this or any resolutions with newer versions? I am using Toad for SQL Server version 6.5.0.3001 Xpert Edition.

Thank you,

Karen

Hello Karen,

I am not sure if this will resolve your issue but the video link below walks users through the basics of variables in automation. This particular video is on Toad Data Point but the concepts are the same for Toad for SQL.

http://www.quest.com/video/how-to-create-and-utilize-parameters-in-toad-data-point-automation8127699

Hopefully this helps, good luck on your data journey,

Robert

hi kmujeyi,

What exactly is your scenario? Could you use #varName# (hash qualified) or :varName (colon prefixed) instead of &varName (ampersand prefixed)?

Martin

Hello,

Thank you for the response. I looked into possibly creating a variable (as I do this with other automation scripts as well, particularly with dates), this seemed to fix the issue and I did use the #s instead.

Thank you again.