We are installing SQL Express and same Execute the SQL scripts
that scripts all are available in one folder that bunch of file we are executing
in Batch file.
This scenario we are trying out but that batch file is not executed.
What is the steps where to i used kindly help me roll out this issue.
my bat file code
sqlcmd -S (local) -i CreateDB.sql
In CreateDB.sql having the following line
SET NOCOUNT ON
GO
use master
PRINT 'CREATING DB'
IF EXISTS (SELECT 1 FROM SYS.DATABASES WHERE NAME = 'MyDB')
DROP DATABASE MyDB
GO
CREATE DATABASE MyDB
GO

-- Create Database objects
:r CrTable.sql
:r CrSP.sql
PRINT 'Process Completed'
GO
Thanks with Regards
Gesh