title: multiple sqlcmd commands in a batch file
body: <p>I have multiple sqlcmd commands to run at a time from a batch file. Each statement when executed separately works perfectly. But if I give like a 5 sqlsmd commands in a bat file it only executes the first one and then I see 1> in my command line screen and nothing happens. How to resolve this?</p>
  
  <p>Note: CALL statement before each line didn't work That is the only solution i found in my reseach </p>
  
  <p>example of what i'm doing::</p>
  
  <pre><code>sqlcmd -S servername-q "EXEC msdb.dbo.prc_Backup @BackupType = 'L'       ,@DBName = 'db' ,@BackupDir = 'J:\MSSQL10.MSSQLSERVER\MSSQL\Backup\db2dba' ,@RetainHours = 47       , @create_sub_dir = 0      " &gt;&gt; C:\tlogresult.txt
  sqlcmd -S servername -q "EXEC msdb.dbo.prc_Backup @BackupType = 'L'      ,@DBName = 'DB2RuntimeMigration' ,@BackupDir = 'J:\MSSQL10.MSSQLSERVER\MSSQL\Backup\DB2RuntimeMigration' ,@RetainHours = 47         , @create_sub_dir = 0      " &gt;&gt; C:\tlogresult.txt
  </code></pre>