Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find a number between two sets of numbers. 1

serino

Programmer
Feb 13, 2003
107
0
16
US
I need some help in figuring this out. is there a way to input a number for example "51424303" and it would return a Job_ID of 1939706. Can this be done with a query and if so how?

Job_ID Range1 Range2
Table1
 
Hi,

Welcome to the new Tek-Tips.

Try this SQL where NUM is the number you referred to.

SELECT Job_ID
FROM yourTableName
WHERE Range_1<=NUM AND Range_2>=NUM
 
Skip,

Thanks! that worked for me.
 

Part and Inventory Search

Sponsor

Back
Top