December 20, 2018 at 6:35 am
I know that it is not that good idea to specify login and password directly into a script, but I need to do it. In BOL it is specified this waySET @login = $(Login); SET @password = $(Password);
I wonder why there is used '$' dollar sign. As both @login and @password variables are declared as sysname, shouldn't I write in text format, I mean something like thisSET @login = 'Abcd'; and
and SET @login = 'Abcd'; and SET @password = '1234';
What's the use of dollar sign and brackets. Thanks for your time!
December 20, 2018 at 7:43 am
elea.grig - Thursday, December 20, 2018 6:35 AMI know that it is not that good idea to specify login and password directly into a script, but I need to do it. In BOL it is specified this waySET @login = $(Login); SET @password = $(Password);
I wonder why there is used '$' dollar sign. As both @login and @password variables are declared as sysname, shouldn't I write in text format, I mean something like thisSET @login = 'Abcd'; and
andSET @login = 'Abcd'; and SET @password = '1234';
What's the use of dollar sign and brackets. Thanks for your time!
It's pretty well documented what the "$" sign is used for in the very document you linked to not to mention the environment you need to be using to use such a thing.
--Jeff Moden
December 20, 2018 at 7:45 am
there is much more to learn
sqlcmd.exe and/or SQLCMD mode
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply