Saturday, July 27, 2013

[SQL Server] Explanation of LIKE '%[0-9]%'?

[SQL Server] Explanation of LIKE '%[0-9]%'?


Explanation of LIKE '%[0-9]%'?

Posted: 27 Jun 2013 01:06 AM PDT

From time to time I need to check if a column is completely numeric (or usually, check for the row contain something other than numeric). I've read the ISNUMERIC has problems. I've used LIKE '%[0-9]%'? successfully, but even after reading around in several places I still don't understand how it works. And I don't want to use anything I can't support. Would someone mind giving me a blow by blow explanation of what each "thing" is doing here? (And if the statement needs to be improved please do so. I've seen some use a ^ in the statement before).

No comments:

Post a Comment

Search This Blog