November 21, 2019 at 5:45 pm
IDNUMBER >= '1000205830' and IDNUMBER <= '1000206010' ORDER BY ID_NUM DESC
I'm also getting IDNUMBER 1000206 included in my results?
Hall of Fame
November 21, 2019 at 6:42 pm
You are comparing strings, not numbers.
MVDBA (Mike Vessey)
November 25, 2019 at 10:34 am
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
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply