Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Extract DB2 data to text files

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Extract DB2 data to text files

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

"Mahesh" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Extract Data from Text Files Little Penny Excel Programming 6 August 15th 07 01:42 PM
Extract Data from Multiple Excel Files Steven Excel Discussion (Misc queries) 1 November 2nd 06 04:58 PM
Help extract numerous text files and how to use avg formula [email protected] Excel Worksheet Functions 0 May 16th 06 11:38 PM
extract text from html files Glowinafuse Excel Discussion (Misc queries) 3 May 31st 05 06:23 AM
Extract Text From Multiple Word Files andibevan Excel Programming 3 October 25th 04 05:30 PM


All times are GMT +1. The time now is 01:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"