Help with loading data from DB2 database to CSV file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Help with loading data from DB2 database to CSV file
# 1  
Old 11-18-2009
Help with loading data from DB2 database to CSV file

Hi everyone!!

I need help regarding this.

How can we load data from DB2 Database tables into a Comma Separated File?

I also have another Question? Using Shell scripting, Is it easy to read Data from a table or from a text file?

It is very urgent for me. Please help me out guys.

Thanks in advance.
# 2  
Old 11-19-2009
1. Found with your friend Google Smilie:
Exporting a table to a file is very simple in db2.
Code:
export to "file" of "filetype" [delimited by "delimiter"] "query"

2. Yes, it's easy and can be more powerful by using Awk and Sed. Tell us what you want want to do with the data.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Compare 2 files of csv file and match column data and create a new csv file of them

Hi, I am newbie in shell script. I need your help to solve my problem. Firstly, I have 2 files of csv and i want to compare of the contents then the output will be written in a new csv file. File1: SourceFile,DateTimeOriginal /home/intannf/foto/IMG_0713.JPG,2015:02:17 11:14:07... (8 Replies)
Discussion started by: refrain
8 Replies

2. UNIX for Dummies Questions & Answers

Spooling data from the database in .csv file with boundary

Hi Guys, Another questions to the genius over here. I have spool the dataf from the database into a .csv file. But can it be possible to have all the rows and column with the boundaries..for example the .csv file which i have is as below: 20140327 BU 9A 3 20140327 SPACE 9A 3 20140327... (8 Replies)
Discussion started by: Pramod_009
8 Replies

3. Shell Programming and Scripting

Creating loops inside a file and extracting and loading data

Help needed (1 Reply)
Discussion started by: Chand Shrestha
1 Replies

4. Shell Programming and Scripting

Looping a flat file and loading data

Hi, I am very new to UNIX environment. And I am stuck in this problem. In my Unix server, I have a file called "tablelist.txt" which gives me a list of the tables in my oracle database like shown below. bmp.table1 bmp.table2 bmp.table3 : : bmp.table20 All these tables have 'batch_id'... (1 Reply)
Discussion started by: Reese coutinho
1 Replies

5. UNIX for Dummies Questions & Answers

data is seen as NULL after loading into database

hello, when I load a data from text file all the values become NULL in the table. Please help me with this problem. Thanks sheen (15 Replies)
Discussion started by: sheen
15 Replies

6. Shell Programming and Scripting

Loading Oracle data to unix in flat file

Hi I would like to know how to load oracle data to unix flat file using a shell script. Can we use sqlldr to import data from oracle, if so can anyone help me with it. (2 Replies)
Discussion started by: raghav288
2 Replies

7. Shell Programming and Scripting

unix script for loading a data from a file into database

Hi All, I am trying to load a data from a files in a particular directory to a database.. cd $SCC isql metdb >> ${LOGDATA}/LOAD.LOG < ! load from "${LDATA}/${FORM}.ld" insert into $LOADTABLE ! But it's showing the error "syntax error at line 46 : `<<' unmatched" Can u plz help me... (5 Replies)
Discussion started by: grajesh_955
5 Replies

8. UNIX for Dummies Questions & Answers

Exception while loading DB2 driver Class.forName("com.ibm.db2.jcc.DB2Driver")

Hi... I m working on UNIX z/OS. Actually i have to pass the parameters from the JCL to java-db2 program thru PARM. I am able to pass the arguments but the problem occured is, it is throwing an exception while loading the db2 driver as 'Javaclassnotfound:com.ibm.db2.jcc.DB2Driver'... (0 Replies)
Discussion started by: Sujatha Gowda
0 Replies

9. Shell Programming and Scripting

Shell Script to Load data into the database using a .csv file and .ctl file

Since i'm new to scripting i'm findind it difficult to code a script. The script has to be an executable with 2 paramters passed to it.The Parameters are 1. The Control file name(.ctl file) 2. The Data file name(.csv file) Does anybody have an idea about it? :confused: (3 Replies)
Discussion started by: Csmani
3 Replies

10. Shell Programming and Scripting

unix script to export data from csv file to oracle database

Hello people, Need favour. The problem I have is that, I need to develop a unix shell script that performs recurring exports of data from a csv file to an oracle database. Basically, the csv file contains just the first name and last name will be dumped to an Unix server. The data from these... (3 Replies)
Discussion started by: vinayagan
3 Replies
Login or Register to Ask a Question