none
sqlcmd output

    Question

  • Very new to SQL commands but I found a writeup about sqlcmd utility for SQL. 

    I have made a .bat file containing the following command, and it does give me an output file.

    sqlcmd <Servername> -i C:\MyQuery.sql -o C:\MyTestFile.txt

    The result is C:\MyTestFile.txt and has the information I need to have.  The problem is, the fields in the text file are not separated by a tab delimiter.  It appears to be a report showing the fields requested. 

    How can I have the text file created as a delimited text file?

    Thanks in advance,

    danc09


    Dan

    Saturday, June 21, 2014 12:51 AM

Answers