• Open a notepad file..type in the below command

    sqlcmd -s -E -Q

    pause

    save the file as .bat file and just double click on the file..it will run the required commond...for testing initially you can specify just a select statement for your query