Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: oracle sqlldr
sd wrote:
> Hello,
> I need to use sqlldr to update a table from a flat file. The flat
> file has three columns
> while the table has two columns. The flat file is a comma delimited
> file. Among the three
> columns in the file the first col is ID, the 2nd date and the 3rd the
> time.
> I need to concatenate the 2nd and 3rd columns and then use sqlldr to
> update the file.
>
> How do I do that?
>
> Thanks
> sameer
One way would be to use a function. Here is a simple demo showing how to use the DECODE function.
LOAD DATA
INFILE *
INSERT
INTO TABLE decodemo
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"'
(
fld1,
fld2 "DECODE(:fld1, 'hello', 'goodbye', :fld1)"
)
BEGINDATA
hello,""
goodbye,""
this is a test,""
hello,""
You could just use the CONCAT function.
Daniel Morgan Received on Mon Apr 07 2003 - 17:15:02 CDT
![]() |
![]() |