Looking at this question on how to compare String
's in SQL: https://stackoverflow.com/a/515051/409976, let's say I have the following data, where START and END are String's.
ID START END
1 1 5
2 A C
I performed a query to search "between" these START and END values unsuccessfully:
select * from TABLE where start <= '2' and '2' <= end -- 0 results
or
select * from TABLE where start <= 'B' and end >= 'B' -- 0 results
Since I'm searching on alphanumeric, i.e. I can't just convert to an Int/Number, how can I perform the above two queries?