var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: SQLCMD - how do I pass parameter at dos command line to input file?
I am not sure if this has been asked before but I couldn't find any thread talking about this.
Let's say we have a parameter in the .sql input file called @Start_Date, how can we pass the value of a particular date, for example, "02-28-2007" to @Start_Date via SQLCMD? is it possible?
I'm trying to skip the need to write a simple windows application...if things can be achieved via dos command line, that will keep everything simple!
If you had checked sqlcmd -? you would have noted the -v option, that you are looking for.
manage to get it done through -v and SET /P option
you can also write sql scripts that reference environment variables, and sqlcmd will replace the env vars appropriately when it invokes the script. I use this a lot and it's a lifesaver.