Solved

export the tables data in excel file

Posted on 2011-03-10
1
541 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 45

Accepted Solution

by:
Kent Olsen 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

How To Install Bash on Windows 10

Windows’ budding partnership with Canonical has certainly led to some great improvements. One of them being the ability to use Bash on your Windows machine without third party applications! This might be one of the greatest things a cloud engineer in a Windows environment can do!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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 (it really isn't that hard to do) Recursive SQL is most often used to convert columns to rows or rows to columns.  A previous article described the process of converting rows to columns.  This article will build off of th…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

624 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