Wednesday, March 7, 2012

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?
JPThis 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
DBMS "SELECT * FROM table" > file.txt
where "DBMS" is the command to run the DBMS SQL interpreter from the command line.|||Yes, I should probably included that info!

Windows Server 2003
SQL 2000

Thanks for the help!

JP

No comments:

Post a Comment