Converting Column headings into values [message #395111] |
Tue, 31 March 2009 05:50 |
Ravin_C
Messages: 38 Registered: February 2008 Location: United Kingdom
|
Member |
|
|
I am trying to import csv/txt files using sql loader and want to have some of the column headings entered as values into the column of the target oracle table while loading or manipulated afterwards via SQL code. Can anyone please help?
|
|
|
|
Re: Converting Column headings into values [message #395142 is a reply to message #395111] |
Tue, 31 March 2009 08:16 |
Ravin_C
Messages: 38 Registered: February 2008 Location: United Kingdom
|
Member |
|
|
ok, i will receive files with name and adress details with various brochure names as column headers with the qty ordered values under each brochure name columns.
In the target oracle table there is a column named 'Brochure Name', so when i import the file into this table the actual Column name has to be entered into this column.
thats why i don't know how to transform the incoming column names into a column of the target table as values.
Any help would be greatly appreciated.
|
|
|
Re: Converting Column headings into values [message #395151 is a reply to message #395111] |
Tue, 31 March 2009 08:38 |
Ravin_C
Messages: 38 Registered: February 2008 Location: United Kingdom
|
Member |
|
|
example:
Incoming file -
Name Tour_London Tour_Paris Tour_NewYork
----- ------------ ---------- -------------
Smith 1 0 1
David 2 0 0
Carl 0 2 0
Wendy 0 1 1
Target Oracle Table -
Name Brochure_Name Qty_Ordered
----- ------------- ------------
Smith Tour_London 1
Smith Tour_NewYork 1
David Tour_London 2
Carl Tour_Paris 2
Wendy Tour_Paris 1
Wendy Tour_NewYork 1
[Updated on: Tue, 31 March 2009 08:40] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|