I have a problem with my query. I need to compare more than 50 values if it is between 2 columns. For example, I have two varchar columns:
col1 col2
-----------
1000 1999
2000 2999
3000 3999
and I have values 1001, 2001, 3001, 4001
.
And I need table with input data and column with Y
or N
if value is between col1 and col2:
input Y/N
-------------
1001 Y
2001 Y
3001 Y
4001 N
I tryed to use IN() but it is not possible use for between. Can you give me an answer. Thx