If I have a varchar column which has the length 30:
[SpecificCode] –> varchar(30) in a db table called [Item]
And if I have to query this table rows to obtain all the rows which have
SpecificCode between 789 and 15000
What may be the fastest way to SELECT in TSQL? (Range test is needed on a varchar field with length 30)
SELECT *
FROM Item
WHERE Item.SepecificCode --how to filter between 789 and 15000?
Assuming the column is full of non-numeric rubbish but no decimals
If just integers
If floats too: