sam2929
asked on
Loading flat file data in tables
How can i do below have a flat file like below:
T|B|P04|WN4|0018025196|201 4-04-14T13 :01:17Z|ET 3|USD|2.00 |4/4/5/7|2 .00|
T|B|P04|WN4|0018025314|201 4-04-14T13 :01:17Z|ET 3|USD|2.00 |4/6/2/7|2 .00|
T|B|P04|WN4|0018025472|201 4-04-14T13 :01:17Z|ET 3|USD|2.00 |4/6/8/7|2 .00|
T|B|P04|WN4|0018025590|201 4-04-14T13 :01:17Z|ET 3|USD|2.00 |4/7/3/7|2 .00|
$|N|
S|N|
P|WIN|2014-04-14T21:01:17Z |
P|PLC|2014-04-14T21:01:17Z |
P|SHW|2014-04-14T21:01:17Z |
P|EX |2014-04-14T21:01:17Z
Want to handle a file where each row can be a different record format,
which is determined by the first Character in the row.
Then each row processed into 1 of 7 separate tables?
Example:
T row will go table A
$ row will go table B
P row go in table C and so on.
T|B|P04|WN4|0018025196|201
T|B|P04|WN4|0018025314|201
T|B|P04|WN4|0018025472|201
T|B|P04|WN4|0018025590|201
$|N|
S|N|
P|WIN|2014-04-14T21:01:17Z
P|PLC|2014-04-14T21:01:17Z
P|SHW|2014-04-14T21:01:17Z
P|EX |2014-04-14T21:01:17Z
Want to handle a file where each row can be a different record format,
which is determined by the first Character in the row.
Then each row processed into 1 of 7 separate tables?
Example:
T row will go table A
$ row will go table B
P row go in table C and so on.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
There are examples out there:
http://www.dba-oracle.com/t_sql_loader_multiple_tables_sqlldr.htm