Home » RDBMS Server » Server Utilities » How to populate one column based on another columns data?
How to populate one column based on another columns data? [message #244459] Wed, 13 June 2007 00:35 Go to next message
jvnaveen
Messages: 29
Registered: March 2005
Location: Bangalore
Junior Member
Hi Friends,

I'm using SQL*Loader for loading data from csv to a table. In the csv file, I have a column called Indicator which contais 1 for some rows. while loading onto my table, I have to get update a new column based on Indicator column.

Ex:

If Indicator in the csv is 1 then the table column tmp should be updated with 'C'

How to do this? Please give me the syntax

Thanks
Naveen J V

Re: How to populate one column based on another columns data? [message #244467 is a reply to message #244459] Wed, 13 June 2007 00:54 Go to previous messageGo to next message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Even if you can do it with SQL*Loader, use external table instead.
It is easier and faster.

Regards
Michel
Re: How to populate one column based on another columns data? [message #244596 is a reply to message #244459] Wed, 13 June 2007 08:29 Go to previous message
joy_division
Messages: 4640
Registered: February 2005
Location: East Coast USA
Senior Member
Here is a hint:

"decode(:indicator,1,'C',null)"
Previous Topic: Problem in Import
Next Topic: Problem SQL Loading a delimited file into two different tables? Please Help!
Goto Forum:
  


Current Time: Sun Dec 04 16:49:04 CST 2016

Total time taken to generate the page: 0.25639 seconds