Executing set of SQL queries using batch file?
Save the commands in a .SQL file, ex: ClearTables.sql, say in your C:\temp folder. Contents of C:\Temp\ClearTables.sql Delete from TableA; Delete from TableB; Delete from TableC; Delete from TableD; Delete from TableE; Then use sqlcmd to execute it as follows. Since you said the database is remote, use the following syntax (after updating for your … Read more