I have a batch file that executes Test.sql. In Test.sql I have following sql statements.
The question is can I pass parameters to the SQL script that I am calling using command ":r".
--Test.sql file contains this script
IF EXISTS (SELECT 1 FROM SYS.DATABASES WHERE NAME = 'NewDB')
DROP DATABASE NewDB
CREATE DATABASE NewDB
:On Error exit
:r c:\Scripts\CREATE_TABLES.sql [parameters...]
View Complete Post