nilknarf1972
SSC Enthusiast
Points: 114
More actions
November 21, 2019 at 5:45 pm
#3699721
IDNUMBER >= '1000205830' and IDNUMBER <= '1000206010' ORDER BY ID_NUM DESC
I'm also getting IDNUMBER 1000206 included in my results?
rVadim
Hall of Fame
Points: 3969
November 21, 2019 at 6:42 pm
#3699748
You are comparing strings, not numbers.
'1000205830'
'1000206'
'1000206010'
--Vadim R.
MVDBA (Mike Vessey)
SSC-Insane
Points: 21797
November 25, 2019 at 10:34 am
#3700526
rvadim is correct
just take the single quotes out of the query. - however if you have stored this as varchar (which is madness) thenyou need to use convert or cast on those values... but even better is to make sure it's an int and get rid of the quotes
MVDBA
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply