Is there any way to stop isql
from adding spacing before and after the returned fields? I just want the values from the table row separated by ,
. At the moment, using -b
and -s ','
, I get:
,some_column_entry , 3213, another_column_entry,
however, I want:
,some_column_entry,3212,another_column_entry,
I read through all the switches, but couldn't seem to find anything appropriate. My wish is to get isql
to output in this form rather than parsing the output.
EDIT:
select top 1 rtrim(ltrim(some_column)) from table
returns
,abc ,
isql
seems to output based on the size of max characters, because if I run the following:
select top 1 rtrim(ltrim(convert(varchar(3), some_column)) from table
I get:
,abc,
Try this
Use RTRIM(LTRIM(ColumnName)) in your -q Query Select command.