SQL Between using multiple rows from 2 colums (start and end)

I'm trying to pull data from a table and my where clause contains needs to contain a BETWEEN condition.  Basically a Start code and an End code.  Each Item that I'm pulling data can contain any number of lines in this table from 1 to over 600 lines.  So, I need to be able to query the table when the user enters a code to look to see if it falls into a range that has been established (start and end).  Each range varies in size.  

Is there a way to check 600 lines to see if the code that was entered by the user falls into any of the ranges?  I would like to avoid FETCH sql, because some of the code I still need to use in Access!  But I'll take any help at this point too!!!!  Thanks.
sborchersAsked:
Who is Participating?
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Connect With a Mentor Infotrakker SoftwareCommented:
Could you do something like this:

SELECT * FROM YourTAble WHERE Col1 > YourFirstValue AND Col2< YourSecondValue

If not, could you provide more information about your tables, and show some sample data, along with some desired results?
0
 
sborchersAuthor Commented:
I will give it a shot in the morning and if it doesn't work I'll try to provide more details.  Thanks, Mike
0
All Courses

From novice to tech pro — start learning today.