Home » RDBMS Server » Server Utilities » SQLLDR WHEN condition with IN CLAUSE (Oracle 10g)
SQLLDR WHEN condition with IN CLAUSE [message #471986] Wed, 18 August 2010 04:08 Go to next message
palanisvr
Messages: 21
Registered: March 2007
Junior Member
Hi Gurus ,

I have a requirement where i have to insert data using sqlloader where it does not satisfies the condition.

It should work like the below but the below condition is giving syntax error. PLease let me know if you any idea.
Thanks in advance..good day.

LOAD DATA
INTO table emp
WHEN location NOT IN ( 'USA' , 'UK' ) AND EMP_NO NOT IN ( 102 , 101)
(
ename ,
..........
..........
)
Re: SQLLDR WHEN condition with IN CLAUSE [message #471987 is a reply to message #471986] Wed, 18 August 2010 04:11 Go to previous messageGo to next message
cookiemonster
Messages: 10853
Registered: September 2008
Location: Rainy Manchester
Senior Member
Have you considered using an external table instead?
Re: SQLLDR WHEN condition with IN CLAUSE [message #472003 is a reply to message #471987] Wed, 18 August 2010 05:04 Go to previous messageGo to next message
palanisvr
Messages: 21
Registered: March 2007
Junior Member
I should use only SQL loader to achieve this.
Re: SQLLDR WHEN condition with IN CLAUSE [message #472007 is a reply to message #472003] Wed, 18 August 2010 05:14 Go to previous messageGo to next message
palanisvr
Messages: 21
Registered: March 2007
Junior Member
Finally got the solution....


LOAD DATA
INTO table emp
WHEN location <> 'USA'
AND location <> 'UK'
AND EMP_NO <> 101
AND EMP_NO <> 102
(
ename ,
..........
..........
)
Re: SQLLDR WHEN condition with IN CLAUSE [message #472008 is a reply to message #472003] Wed, 18 August 2010 05:14 Go to previous messageGo to next message
Michel Cadot
Messages: 58618
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Why?
Why should you use an inefficient way when you have an efficient one?

Regards
Michel
Re: SQLLDR WHEN condition with IN CLAUSE [message #472031 is a reply to message #472007] Wed, 18 August 2010 08:07 Go to previous message
palanisvr
Messages: 21
Registered: March 2007
Junior Member
Previously i haven't tried this...
Previous Topic: Triggers does not fired while doing import in oracle9i
Next Topic: Loading data via Sql Loader into Varray Tables
Goto Forum:
  


Current Time: Wed Jul 30 08:33:49 CDT 2014

Total time taken to generate the page: 0.09669 seconds