Home » SQL & PL/SQL » SQL & PL/SQL » SQL help (10G)
SQL help [message #397053] Wed, 08 April 2009 13:51 Go to next message
vkrishnan
Messages: 2
Registered: April 2009
Junior Member
I have a question on SQL.

I have 2 million rows that I need to scan for a condition. But if this condition gets satisfied say 25 times then I need to stop processing the rest of the rows.

Is there a way I can do this using only SQL
Re: SQL help [message #397055 is a reply to message #397053] Wed, 08 April 2009 13:54 Go to previous messageGo to next message
BlackSwan
Messages: 25039
Registered: January 2009
Location: SoCal
Senior Member
>Is there a way I can do this using only SQL
Yes, as long as you do not care which 25 get returned.

WHERE ROWNUM < 26
Re: SQL help [message #397069 is a reply to message #397055] Wed, 08 April 2009 14:46 Go to previous message
vkrishnan
Messages: 2
Registered: April 2009
Junior Member
Yes, it worked.

Thanks
Previous Topic: Ftping using oracle procedure
Next Topic: Effective spooling method
Goto Forum:
  


Current Time: Tue Dec 06 04:54:03 CST 2016

Total time taken to generate the page: 0.08101 seconds