I am using sqlcmd commandline utility to deploy my objects and seed data to site. Well, its runnign perfectly in normal cases. I have gone through a critical condition now. one of the insert script contains a value like the one given below
This fails my insert statement saying, 'Account' scripting variable not defined.
I understand, as sqlcmd takes $(Account) as a variable it is not allowing to insert the above string.
I tried many options, like replace and searched for escape character but nothing worked out.Can anybody help me in this regard?
asked Jul 27 '12 at 08:58 AM in Default
Oh I understand now. You don't want it to be seen as a variable
The insert should be working OK, it's just that you get an error message as output. You can silence the output with
Alternatively change the sql script to have explicit concatenation
Kev,Can u pls suggest any idea on my below post? h ttp://ask.sqlservercentral.com/questions/92047/sqlcmd-error-when-saving-xml-data-from-cmd-file.html
answered Jul 31 '12 at 09:40 AM