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: Control File problem

Re: Control File problem

From: Eric Parker <eric.parkerthedross_at_virgin.net>
Date: Tue, 16 Sep 2003 16:40:15 +0100
Message-ID: <A9G9b.975$DM5.9379@newsfep4-glfd.server.ntli.net>

"Amit Saha" <da_saha_at_yahoo.com> wrote in message news:7851859c.0309160652.11a91abb_at_posting.google.com...
> Hi,
>
> I have a csv file that has values as given below:
>
> ,F100,F101,F102
> 1000,X,X,
> 1002,X,,X
>
> I need to load this data in the table structure as below
>
> Name Null? Type
> ------------------------------- -------- ----
> POSTE_ID VARCHAR2(6)
> ELEMENT_ID VARCHAR2(6)
> ELEMENT_VALUE VARCHAR2(1)
>
> where the data should be populated as below:
>
> POSTE_ID ELEMENT_ID ELEMENT_VALUE
> ---------------- ----------- ---------------
> 1000 F100 X
> 1000 F101 X
> 1000 F102
> 1002 F100 X
> 1002 F101
> 1002 F102 X
>
> Could anybody help me with writing the control file. However, if there
> is any different way in which it could be done, you are welcome
>
> Thanks
> Amit

Amit

I cannot see a way of loading your table directly.

Two suggestions :

  1. Load your csv file into a staging table and process it from there using PL/SQL
or

2. Process the csv file using utl_file package within PL/SQL.

I don't believe you have provided enough detail about your csv file format to
give any more clues.

HTH eric

--
Remove the dross to contact me directly
Received on Tue Sep 16 2003 - 10:40:15 CDT

Original text of this message

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