I'm braindead tonight having just returned from holiday and need the solution to what is probably something very simple.
I have a DB table that has two INT columns AgeFrom and AgeTo - in my SQL queries I have an age value where I want to find all rows where the age value is between the two column values but I cannot for the life of me work out how to do this simple SQL!!
So for instance, I have the following rows...
RowID AgeFrom AgeTo
1 30 40
2 25 50
3 14 26
4 49 85
Where my age value is 25, the rows 2 and 3 would be returned?
Appreciate your help!