Home » RDBMS Server » Server Utilities » SQL Loader
SQL Loader [message #200027] |
Fri, 27 October 2006 08:25 |
khurana_mani
Messages: 1 Registered: October 2006 Location: Delhi
|
Junior Member |
|
|
Hi All
I have a single record which is a group of multiple records.
I want to load this record using SQL Loader.
Any idea how this can be done.
Sample record is given below:
28,57740196,,,2500,28,39186291,,,160000,36,57800839,,2851,55993,42,53112875,,1470,116500,28,57506401,100006205,104,3097,12,53116270,100006270,9,3500,14,53116275,100010652,912,5194,,58401166,100013995,157,3500,,58200737,100017715,23,500000
We need to insert the above single record as 9 separate records as given below.
28, 57740196,,, 2500
28,39186291,,,160000
36,57800839,,2851,55993
42,53112875,,1470,116500
28,57506401,100006205,104,3097
12, 53116270, 100006270, 9, 3500
14,53116275,100010652,912,5194
,58401166,100013995,157,3500
,58200737,100017715,23,500000
If you have any idea about it please let me know.
|
|
|
Re: SQL Loader [message #200059 is a reply to message #200027] |
Fri, 27 October 2006 13:09 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
If it is the only record, you'd better type it manually into the table
Just kidding! I don't know how to deal with it using SQL*Loader, but could suggest another option: create a temporary table which would look like this:
CREATE TABLE temporary_one (whole_record VARCHAR2(1024);
Now, using SQL*Loader, load the whole record into it. Finally, write a procedure which would parse that long worm and separate it into pieces you need - this part shouldn't be too difficult.
Another option is use of external table (if your database version supports it) - you'd access this (file system) file as if it was an ordinary Oracle table and write query/PL/SQL procedure against it (which is, basically, the same as previous suggestion).
There, of course, might be an option to do it directly from SQL*Loader; perhaps someone of the experienced users will be able to help you.
|
|
|
Goto Forum:
Current Time: Thu Dec 26 00:07:41 CST 2024
|