I have a query which returns a set of numbers:
SELECT Sequence FROM Table1 WHERE Hash=2783342
Returns:
578
642
313
Now, I want to find all rows in the first table where any of that set of numbers is between two other columns. For the purpose of illustration, I am just picking 578, but I also want all of the rest:
SELECT * FROM Table1 WHERE 578 BETWEEN Sequence AND SequenceEnd