Extract DB2 data to text files

M

Mahesh

Hi,
I have a list of queries in an excel workbook which need to be run on DB2
database and I am looking for a macro which can run these queries and save
the data in txt files. The output of these queries is more than 100K records
so I want to save it in txt files.

Please let me know if this is possible. If so, can you please let me know
the connection string and syntax to export the data to txt files.

Please let me know on this.

Thanks,
Mahesh
 
J

Joel

The best way is to record a macro while doing the query manually. go to tool
Menu - Macro - Record new macro.

The go to Data Menu- Import Externa data - New Database Query.

Run the Query. Then stop the macro.

You can also save the reults in a textt file as part of the recorded macro.

I would recommend savving the files as a CSV file instead of text. The CSV
file is text but seperates the columns with commars which is easier to read
be other programs.

the go to
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top