Hi, I usually use MySQL so haven't come accross this problem before.
I have an integer field, and say I want to pull up all entries with values between 18 and 20, I would normally use:
SELECT * FROM users where ch_4_year>=18 and ch_4_year<=20
MS SQL appears to consider the following to be ascending
1
10
11
12
13
14 etc.
Therefore the above command also pulls out values of
2 as well as 18,19,20.
Does anybody know how to avoid this?
Thanks in advance
Rich
I have an integer field, and say I want to pull up all entries with values between 18 and 20, I would normally use:
SELECT * FROM users where ch_4_year>=18 and ch_4_year<=20
MS SQL appears to consider the following to be ascending
1
10
11
12
13
14 etc.
Therefore the above command also pulls out values of
2 as well as 18,19,20.
Does anybody know how to avoid this?
Thanks in advance
Rich