Home » RDBMS Server » Server Utilities » Checking column value in SQL Loader (Oracle 10g)
Checking column value in SQL Loader [message #515509] Tue, 12 July 2011 01:06 Go to next message
hari_bk
Messages: 110
Registered: March 2006
Senior Member
Hi

My requirement is to load the data from feed file into two tables based on the value of a column in feed file.

say column in feed file is "Activity_Value" . If the Activity_value is 10, the data from feed file should be loaded into Table A and If the Activity Value is 20 the data from feed file should be loaded into Table B.

Can any one suggest how can this be achieved?

Thanks in adv.




Re: Checking column value in SQL Loader [message #515518 is a reply to message #515509] Tue, 12 July 2011 01:25 Go to previous messageGo to next message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Research use of the WHEN clause (Loading records based on a condition).

[Updated on: Tue, 12 July 2011 01:26]

Report message to a moderator

Re: Checking column value in CTL file [message #515525 is a reply to message #515509] Tue, 12 July 2011 02:00 Go to previous messageGo to next message
Michel Cadot
Messages: 68728
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
INTO table1 WHEN (...)
INTO table2 WHEN (...)

Clearly explained in the documentation, see Case Study 5: "Loading Data into Multiple Tables".

Regards
Michel
Re: Checking column value in CTL file [message #515534 is a reply to message #515525] Tue, 12 July 2011 02:35 Go to previous message
hari_bk
Messages: 110
Registered: March 2006
Senior Member
Thanks for quick response. Will try this.

Regards.
Previous Topic: Trapping SQL Loader summary counts
Next Topic: sql*loader
Goto Forum:
  


Current Time: Mon Dec 23 10:47:19 CST 2024