Home » SQL & PL/SQL » SQL & PL/SQL » Find the Less Serial Numbers in a table (Oracle 9i)
Find the Less Serial Numbers in a table [message #313048] Thu, 10 April 2008 08:56 Go to next message
mailtokkalyan
Messages: 65
Registered: December 2006
Location: Bangalore
Member
Hi ,
I want to retrive the records which are less than the current slno, For example,
Table Name : GRN_HDR
There are 5 Records...
GRN_NO GRN _DATE DC_NO INV_NO DC_DATE
---------------------------------------------
GRN0001 10/03/08 101 05/03/08
GRN0002 10/03/08 101 05/03/08
GRN0003 10/03/08 101 05/03/08

My Current GRN No Is GRN0003...I want to retrive the Previous GRN Numbers...i cannot use min or max...because GRN Number may not be sequence, so should i use rowid? how? Please Tell me..

Thanks,

Kalyan
Re: Find the Less Serial Numbers in a table [message #313054 is a reply to message #313048] Thu, 10 April 2008 09:05 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
http://www.orafaq.com/forum/t/88153/0/
Read & FOLLOW posting guidelines as stated in URL above
Re: Find the Less Serial Numbers in a table [message #313072 is a reply to message #313054] Thu, 10 April 2008 09:58 Go to previous message
skooman
Messages: 913
Registered: March 2005
Location: Netherlands
Senior Member
Hint: lookup lag/lead functions (with order by clause)
Previous Topic: please, i need a help in procedure
Next Topic: Oracle Connect by - all parents of child in 1 row
Goto Forum:
  


Current Time: Sat Feb 15 11:59:35 CST 2025