I am outputting a simple select query to a txt file. But currently the column headers are also exported. I only want to have the returning rows and not the headers. Anybody know how to deal with this?
i normally use the ltrim and rtrim function and delimit the data with a pipe "|"...
i'm assuming you are trying to get a bcp out 'look'...
if so use the following:
use databaseName
go
select ltrim(rtrim(convert(char(10),numericColumnName)))+"|"+
ltrim(rtrim(charColumnName1))+"|"+
ltrim(rtrim(charColumnName2))
from tableName
go
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.