Hello is it possible to run .sql file with parameter
like
:R c:\scripts\<scrips1>.sql,<param>
:R c:\scripts\<scrips2>.sql,<param>
Hello is it possible to run .sql file with parameter
like
:R c:\scripts\<scrips1>.sql,<param>
:R c:\scripts\<scrips2>.sql,<param>
Try this:
sqlcmd -E -S <Server name> -v test="Some value" -i YourSqlFile.sql
Also check Use sqlcmd with Scripting Variables