Saturday, June 30, 2012

SQL - Filter Non-Alpha First Character


select COUNT(*) from tmp_audit_geographic where sel_city LIKE '[A-z]%'

select COUNT(*) from tmp_audit_geographic where sel_city NOT LIKE ISNUMERIC(sel_city)

select * from table
where ASCII(Name) NOT BETWEEN 65/* A */ and 90/* Z */
 AND ASCII(Name) NOT BETWEEN 97 /* a */ AND 122 /* z */

No comments:

Post a Comment