Home » RDBMS Server » Server Utilities » Particular Coulmns loading
Particular Coulmns loading [message #133567] Fri, 19 August 2005 12:43 Go to next message
alka205
Messages: 18
Registered: August 2005
Junior Member
I have a csv file wanted to upload in oracle through SQL loader.

But csv file has 4 columns seperated by coma col1,col2,col3 and col4
Tablea needs to be populated. Tablea has only two columns col5 and col6

Now from csv file I want to upload col2 and col3 to two columns of table.

col5==col2
and col6==col3

I cannot do this by giving positions in column because in csv file the coulmn size is not fixed.
Means some data in col2 has 4 character and some has 5.

Please help


LOAD DATA
infile '/test.csv'
BADFILE '0719.BAD'
APPEND
INTO TABLE tablea
fields terminate by "," trailing nullcols
(
col5,
col6)
Re: Particular Coulmns loading [message #133572 is a reply to message #133567] Fri, 19 August 2005 13:05 Go to previous message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
use FILLER as shown here

http://www.orafaq.com/forum/t/26690/0/
If it is not helping, let us know and post your control file,table ddl and some sample data.

Previous Topic: Problem with TAB field terminators
Next Topic: sql loader and line feed
Goto Forum:
  


Current Time: Thu Jul 04 05:49:21 CDT 2024