Home » RDBMS Server » Server Utilities » sql loader Problem
sql loader Problem [message #390343] Fri, 06 March 2009 01:12 Go to next message
athene
Messages: 11
Registered: January 2009
Junior Member
I need data in the table as

table csv_test
----------------
C1 C2 C3
1 3 8
9 3 5

but the csv file provided to me is in the format

C1,1,9
C2,3,3
C3,8,5

How can I use sql loader to load data into the above mentioned table.

Thanks in advance
Re: sql loader Problem [message #390349 is a reply to message #390343] Fri, 06 March 2009 01:21 Go to previous messageGo to next message
BlackSwan
Messages: 25035
Registered: January 2009
Location: SoCal
Senior Member
.How can I use sql loader to load data into the above mentioned table.
Make the person providing the raw data, to provide it as you need data
Re: sql loader Problem [message #390350 is a reply to message #390343] Fri, 06 March 2009 01:24 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Another solution (not as good as BlackSwan's one) is to use external table and standard pivot query.

Regards
Michel
Re: sql loader Problem [message #390385 is a reply to message #390343] Fri, 06 March 2009 03:26 Go to previous message
Mahesh Rajendran
Messages: 10672
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Depends on your environment too. You can fix the datafile before loading. In this case, a simple awk script.
oracle@chum#cat first.csv
C1,1,9
C2,3,3
C3,8,5
oracle@chum#transpose.awk first.csv 
C1 C2 C3
1 3 8
9 3 5
Previous Topic: export done in diferrent character set than that opf server
Next Topic: dp import with tablespaces
Goto Forum:
  


Current Time: Sat Dec 03 18:34:20 CST 2016

Total time taken to generate the page: 0.08055 seconds