Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: oracle sqlldr

Re: oracle sqlldr

From: DA Morgan <damorgan_at_exxesolutions.com>
Date: Mon, 07 Apr 2003 15:15:02 -0700
Message-ID: <3E91F866.B8397069@exxesolutions.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US