SELECTRTRIM(CUSTNMBR)AS CUSTNMBR
,REPLACE(REPLACE(CUSTNMBR ,SUBSTRING(CUSTNMBR ,PATINDEX('%[^a-zA-Z0-9 ]%' ,CUSTNMBR) ,1) ,'') ,CHAR(32) ,'')AS NU_CUSTNMBR
,CUSTNAME
FROM RECORDSTABLE
WHERECUSTNMBR LIKE '%[^a-zA-Z0-9 ]%'
OR CHARINDEX(CHAR(32) ,RTRIM(CUSTNMBR)) > 0;
No comments:
Post a Comment