• This link should help a lot https://msdn.microsoft.com/en-us/library/ms188714.aspx but one way you can do the prompting on the command line is using "set /p" (I'm assuming you're on the command line since you are using sqlcmd.exe) which will prompt the for input. You can create a batch file something like the below:

    @echo off

    set /p month=Month number:

    set /p id=Batch ID:

    sqlcmd -S server -d databasename -E -Q "SELECT * FROM dbo.tbl_fr WHERE bill_month = %month% AND batch_no = %id%" -o report.txt