August 6, 2022 at 4:58 am
Hi All,
I have to find the special characters in email address apart from alphabets, numbers
SELECT EmailAddress AS ValidEmail
FROM Contacts
WHERE EmailAddress LIKE '%_@__%.__%'
AND PATINDEX('%[^a-z,0-9,@,.,_,\-]%', EmailAddress) = 0
GO
Regards
Sathish Kumar
August 6, 2022 at 6:03 am
Is there a problem with the code you posted? I've not spent a lot of time looking at the code but I think you need to change the " = 0 " to "<> 0" in order for it to find the bad rows.
If that's not the issue, please provide any errors your code may produce. "Same day rule" applies. 😉
--Jeff Moden
Change is inevitable... Change for the better is not.
August 6, 2022 at 4:19 pm
This was removed by the editor as SPAM
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply