Reputation: 1604
Objective:
Is there a simple way of excluding any result that contains anything but a number
These, for example, should be excluded:
Upvotes: 0
Views: 399
Reputation: 17915
where col not like '%[^0-9]%'
or
where patindex('%[^0-9]%', col) = 0
patindex()
would be most useful if you need to find the position of matches and parse the string.
Upvotes: 2