Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ISQL command line

Status
Not open for further replies.

egodette

Technical User
Jun 12, 2002
222
US
I'm trying to produce an output file with a TAB as column seperator. I'm using the -s argument but how to I get a TAB after the -s? From the command line it just beeps at me letting me know I cant use the TAB key.

Thanks
 
Command line? Can you post the T-SQL code here?

"Don't be irreplaceable. If you can't be replaced, you can't be promoted."
 
ISQL -S<server name> -d<database name> -U<user name> -P<password> -i<sql command file> -o<output file>
-s<colseperator>

If I put -s, I get a comma seperated file. How do I get a TAB seperated file?
 
Try CHAR(9)

"Don't be irreplaceable. If you can't be replaced, you can't be promoted."
 
Sorry, didnt work. I also tried holding down the alt key and typing 010 resulting in ^K. That didn't work either.

 
Did you try -s CHAR(9) or -s CHAR(9), ?

"Don't be irreplaceable. If you can't be replaced, you can't be promoted."
 
-sCHAR(9)

It made the column seperator a C

SECID CCLEARING_CURRENCY_COC C C C
SHARES CAVG_PRICE CEXCHANGE_RATECINVERTC
COMMISSION CEXPENSE_CHARGE1 C
OTHER_FEES CTAX C CDATEVAL C
SETTLEDATECTRADE_CURRCPORTFOLIOCEXT_TRADE_ID
-----------------------------C--------------------C----C-----------C----------
------------------------C------------------------C-------------C------C
------------------------C------------------------C
------------------------C-----C------------------------C--------C
----------C----------C---------C------------

(0 rows affected)
 
Crud. Sorry I can't be of more help. You're the first person I've ever met who does command-line SQL.

"Don't be irreplaceable. If you can't be replaced, you can't be promoted."
 
I haven't tested this, but you could try:

[tt]-s"^I"[/tt]

[tt]^I[/tt] is [tt]CHAR(9)[/tt]


Hope this helps

[vampire][bat]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top