Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Need SQL code for this logic - - From Serial and To serial no.

22428Dec 19 2005 — edited Dec 19 2005
In Forms 4.5 Screen I have two text boxes where i will be entering From Serial No
and to serial no.

I want the code which will check whether any number in between these from and to serial exists in a table or not ?

For Example

Select * from t; -- contains

serial number
-------------
321-456-789
123-456-654

321-569-986
321-569-987


When I enter from Serial no 321-456-789 and to serial no as 321-456-789.. I should get a message sayinig that 321-456-789 exists.

When I enter from Serial no 321-569-986 and to serial no as 321-569-988.
I should get a message sayinig that 321-456-986 exists.
I should get a message sayinig that 321-456-987 exists.
I should get a message sayinig that 321-456-988 not exists.

is it possible with a SQL query or do we need to go for procedure or temp table ?
If anybody ahving similar code please post it here.

Thanks in Advance
Devender
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 16 2006
Added on Dec 19 2005
4 comments
398 views