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