Like Operator with Regular Expression.

vishalneeraj-24503
Posted by vishalneeraj-24503 under Sql Server category on | Points: 40 | Views : 209
SELECT MODIFIED_BY,* FROM TEST1 WHERE MODIFIED_BY LIKE '%[^a-zA-Z0-9]%'
;will show MODIFIED_BY with alphabates values
SELECT MODIFIED_BY,* FROM TEST1 WHERE MODIFIED_BY LIKE '%[^a-z A-Z]%';
will show MODIFIED_BY with both alphabates and numeric values
SELECT MODIFIED_BY,* FROM TEST1 WHERE MODIFIED_BY LIKE '%[a-z]%';
will show with a to z alphabates only
SELECT MODIFIED_BY,* FROM TEST1 WHERE MODIFIED_BY LIKE '%[A-Z]%';
will show with a to z alphabates only
SELECT MODIFIED_BY,* FROM TEST1 WHERE MODIFIED_BY LIKE '%[.]%';
will show value which contains dot(.) within a name
SELECT MODIFIED_BY,* FROM TEST1 WHERE MODIFIED_BY LIKE '%[0-9]%';
will show MODIFIED_BY with numeric values

Comments or Responses

Login to post response