Run SQL and compile them to Excel sheet

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
Mahadev
Participant
Posts: 5
Joined: Tue Nov 21, 2006 5:13 am
Location: Bangalore

Run SQL and compile them to Excel sheet

Post by Mahadev »

We write a lot of SQL statements to do data profiling. The results are compiled into an Excel sheet into tabs for each profiling rule. Now if the query returns a lot of data the analyst has to wait a long time for the data to show up and then copy it all into the excel sheet. I am asked to improve this process.

Probelms that I want to solve:

1) Running the SQL and storing the data in sequential file. ODBC, with "read SQL From File" is the answer to it.

2) The above solution presents another problem. Splitting the consolidated SQL file into 1 SQL per file. In other words, one SQL file per SQL for the ODBC stage to read. I am thinking of a Basic Routine to do this.

3) Compiling the data into Excel tabs is the challenge. I am thinking of the writting the data in XML format that can be opend by Excel. Any other thoughts.

What i am looking for is, how much of it is already out there and how much of it has to be invented. Database is DB2 and we are using the DB2 Command Editor to run the SQL queries.

Note: I am new here and i am not sure why we are using SQL when we already have Information Analyzer. That is a question i will ask Manager here at a latter time.
Mahadev V
Post Reply