If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > Export query in text file

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-05-02, 10:41
lucsky8 lucsky8 is offline
Registered User
 
Join Date: Sep 2002
Posts: 1
Export query in text file

HI i did a query and i but it in a temp table. And i want to send it a texte file with.

EXEC ('master..xp_cmdshell ''osql -S -U sa -P -q "select * from ##qryExportData" -o F:\Bridge\Export\PrdHrs' + @cur_server_descr + '.txt''')

That it working fine. But i want to know hot to put a startCol and EndCol in the .txt

Ex : i would like my first item to start at the position 1 and end a 10.
My second start at 11 and and at 20.

Is it possible.

Thanks in advance
Reply With Quote
  #2 (permalink)  
Old 09-06-02, 13:19
rnealejr rnealejr is offline
Registered User
 
Join Date: Feb 2002
Posts: 2,232
You need to use bcp or dts (export).
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On