RE: Loading Data from CSV file

RE: Loading Data from CSV file

 

  

Hi Ravi,

Can you please try
1. UNLOAD for the file (just to get the record structure)
2. Format the input records in the same format as the UNLOADED file.
3. Then try the following on DB2 command prompt
LOAD FROM <filename> MESSAGES <msgfile> INSERT INTO <tablename>

In the above the UNLOAD is just to ensure that your input file is in the
format as required for the table insert.

Regards,
Abhishek.

-----Original Message-----
From: Ravi Tellakula
[mailto:db2udbdba-ezmlmshield-x88255721.[Email address protected]
Sent: Wednesday, November 22, 2006 6:04 PM
To: LazyDBA Discussion
Subject: RE: Loading Data from CSV file

I don't need to import entire file and my file is not tab delimited. I
need to import file based on positions and also need to import only some
of the data.

Is it better for me to use LOAD?

-----Original Message-----
From: Kaushal Anand
[mailto:db2udbdba-ezmlmshield-x14245971.[Email address protected]
Sent: Wednesday, November 22, 2006 6:02 PM
To: LazyDBA Discussion
Subject: RE: Loading Data from CSV file

Try

db2 import from <file> of del insert into <table>

Regards,
Anand


-----Original Message-----
From: Ravi Tellakula
[mailto:db2udbdba-ezmlmshield-x62455529.[Email address protected]
Sent: Wednesday, November 22, 2006 5:59 PM
To: LazyDBA Discussion
Subject: Loading Data from CSV file

Hello All,



I would like to know is there anything similar in DB2 to load data from
a CSV file to a table in DB2? I used to use sqlldr in oracle for doing
this.



Thanks,

Ravi



---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY To post a
dba job: http://jobs.lazydba.com To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html




---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY To post a
dba job: http://jobs.lazydba.com To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html


---------------------------------------------------------------------
TO REPLY TO EVERBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY To post a
dba job: http://jobs.lazydba.com To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
--------------------------------------------------------

NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error.

DB2 & UDB email list listserv db2-l LazyDBA home page