Toad World® Forums

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!


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 ( Automation script would be also helpful.



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


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,



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 Xpert Edition.

Thank you,


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.

Hopefully this helps, good luck on your data journey,


hi kmujeyi,

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



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.