Solved

export the tables data in excel file

Posted on 2011-03-10
1
520 Views
Last Modified: 2012-05-11
 am working on windows system and db2 installed in linux machine.am connecting the db using putty.
i want to export the tables data in excel file or some other file .
what is the command in db2 to export the data in some file.
where this file will be placed?
0
Comment
Question by:chaitu chaitu
1 Comment
 
LVL 45

Accepted Solution

by:
Kdo earned 500 total points
ID: 35094397
Hi chaituu,

From the command line interface (CLI) you can use the EXPORT or DUMP command to copy the contents of a table or query to a file.

EXPORT TO filename OF DEL
  MODIFIED BY COLDEL,
  SELECT * FROM mytable


If you're going to use anything but the default delimiter you'll need to use the MODIFIED BY COLDEL clause (shown above).  Replace the comma with your delimiter (Tab, colon, hash, etc.)


Good Luck,
Kent
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

November 2009 Recently, a question came up in the DB2 forum regarding the date format in DB2 UDB for AS/400.  Apparently in UDB LUW (Linux/Unix/Windows), the date format is a system-wide setting, and is not controlled at the session level.  I'm n…
Recursive SQL in UDB/LUW (you can use 'recursive' and 'SQL' in the same sentence) A growing number of database queries lend themselves to recursive solutions.  It's not always easy to spot when recursion is called for, especially for people una…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now