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 > Automate query output to .txt or .csv file

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-04-05, 09:02
jjrenner jjrenner is offline
Registered User
 
Join Date: Apr 2004
Posts: 12
Question Automate query output to .txt or .csv file

Good day!

What is the easiest most efficient way to output a query to a .txt or .csv?

JP
Reply With Quote
  #2 (permalink)  
Old 10-04-05, 11:08
Peter.Vanroose Peter.Vanroose is offline
Registered User
 
Join Date: Sep 2004
Location: Belgium
Posts: 1,079
This depends on you OS (MS-Windows or UNIX or ...) and your DBMS (DB2 or Oracle or ...)
Essentially, in all cases, you may do something like
Code:
 DBMS  "SELECT * FROM table" > file.txt
where "DBMS" is the command to run the DBMS SQL interpreter from the command line.
Reply With Quote
  #3 (permalink)  
Old 10-05-05, 06:54
jjrenner jjrenner is offline
Registered User
 
Join Date: Apr 2004
Posts: 12
Yes, I should probably included that info!

Windows Server 2003
SQL 2000

Thanks for the help!

JP
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