Problem:
How to facilitate migrating DB2 tables to MS Excel
Resolution:
To migrate DB2 tables to MS Excel use the 'export' feature in the SQL wizard.
To achieve this, do the following:
- Create a new project within Net Express IDE and add your source file(s).
- Make sure XDB server is up and running. If not, go to Tools | SQL for DB2 | Start Server menu option.
- Select Tools | SQL for DB2 | SQL Wizard menu option from within the IDE window
- Open up a table in your database
- Select File| New | Export within the SQL Wizard window
- Change the 'File name' of the 'Target File Information' on the 'Export' window to have the extension .csv
- Select the 'Format' option on the 'Export' window as 'ASCII delimited' via the drop down menu.
- In the 'Fld Delim' field of the 'Export window' type a comma (ie ",")
- Click on the 'run' icon on the SQL Wizard window toolbar (under the menu options)
- Use Window Explorer to open up the excel file to review or edit the data within the table. You can import the modified data back into your database using the 'Import' feature in the SQL wizard, in a similar way.
Note: This feature is also available in Mainframe Express.