sql server 2008 - sqlcmd mode from SSMS - setvar assignment to a substitution variable possible? -
I'm enabling SQLCMD mode from SQLMS 2008R2.
With the code below: I was expecting to see: Is there a scripting variable in the assignment of another scripting variable? If so, what is the syntax? Variable replacement: SETVAR does not work, because in this case it is just a token replacement; variable replacement in You can emulate such behavior: Regards.
Hello $ (greeting)
Hello Hollow
: SETAR GREETING "Hello" DECLARE @ Salutation VARCHAR (5) = $ (greeting); SELECT @salutation;
Comments
Post a Comment