Skip to content
Advertisement

Use smaller than on like clause

I have some number like

These numbers are only an example I have a lot of 14… a lot of 15… etc.

Now in WHERE clause of a stored procedure, I want to exclude all numbers who start with 15 or less

so I can do something like:

Is there a way to change this and use something like TestColumn NOT LIKE < '15%'

Advertisement

Answer

If the value of TestColumn is a string you could use a cast to integer of the two leftmost chars

and for what in your comment

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement