Home » RDBMS Server » Server Utilities » can we use '<' with WHEN in sqlldr??
icon3.gif  can we use '<' with WHEN in sqlldr?? [message #227218] Tue, 27 March 2007 10:01 Go to next message
ozzy80
Messages: 55
Registered: June 2005
Member
Hello,

I am trying to use WHEN clause in the control file to compare if the filed is less than some number... can that be done??

thnx,
Ozzy
Re: can we use '<' with WHEN in sqlldr?? [message #227230 is a reply to message #227218] Tue, 27 March 2007 10:22 Go to previous messageGo to next message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

Hi,
Are you try ?

http://orafaq.com/faqloadr.htm#SELECTIVE

Yes you can.

regards
Taj
Re: can we use '<' with WHEN in sqlldr?? [message #227234 is a reply to message #227230] Tue, 27 March 2007 10:43 Go to previous messageGo to next message
ozzy80
Messages: 55
Registered: June 2005
Member
No, I mean, by the example...

LOAD DATA
   INFILE  'mydata.dat' BADFILE  'mydata.bad' DISCARDFILE 'mydata.dis'
   APPEND
   INTO TABLE my_selective_table
   [B]WHEN service_key < 1000[/B]
   (
      region              CONSTANT '31',
      service_key         POSITION(01:11)   INTEGER EXTERNAL,
      call_b_no           POSITION(12:29)   CHAR
   )
Re: can we use '<' with WHEN in sqlldr?? [message #227237 is a reply to message #227234] Tue, 27 March 2007 11:00 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10672
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
SQL*LOADER WHEN Clause would work only for EQUAL or NOT-EQUAL conditions. GREATER THAN or LESSER THAN is not supported.
Several enhancement request was placed years ago and i beleive it is still there.
I have not yet tested it out in 10g
Re: can we use '<' with WHEN in sqlldr?? [message #227238 is a reply to message #227237] Tue, 27 March 2007 11:10 Go to previous messageGo to next message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

Yes,
Correct sql loader only support "=" or "<>" not supported "<,>".

thank you for correction.

regards
Taj
icon14.gif  Re: can we use '<' with WHEN in sqlldr?? [message #227246 is a reply to message #227218] Tue, 27 March 2007 12:40 Go to previous message
ozzy80
Messages: 55
Registered: June 2005
Member
Oh, thanks guyz!

Thats what I thought, coz I was getting all kinds of errors, no matter how I try to do it... that certainly helps!

~Ozzy

[Updated on: Tue, 27 March 2007 12:41]

Report message to a moderator

Previous Topic: How to write a control file for below data file ( Its a fixed length)
Next Topic: Import file Size
Goto Forum:
  


Current Time: Wed Dec 07 20:18:19 CST 2016

Total time taken to generate the page: 0.06455 seconds