Special Characters - SQL

Asked

Viewed 883 times

0

Does anyone know how I can filter only characters like in the example below ?

Email
Jhó[email protected]
Khã[email protected] 

As seen above it appears ' ' ' and '~' and may also appear '.. ' or ',' and would like to filter this . There is a way to create a pattern for this ?

I wanted to find a way to get any kind of special character as much as accentuation as %,#, or other of that kind

I am using Sql Server 2012

  • What do you mean "filter"? You want to search the emails that have these characters?

  • @Andersoncarloswoss , then the search I need to do beyond all the information that have accentuation , also those who have some . or , , Mfim which does not display any special character

  • Even more confusing... "which does not have any special character", you want the result to be the ones that CONTAIN these characters or that DO NOT CONTAIN?

  • I want the result to contain these characters

1 answer

2

The following query will bring up the entire line containing any special character.

Select * from tabela Where Coluna LIKE '%[^A-Za-z0-9, ]%'

You can also try a Where with all the characters, it is more laborious and of course, you need to know all the characters:

Coluna LIKE '[!@#$%]'

Browser other questions tagged

You are not signed in. Login or sign up in order to post.