0

I need to retrieve rows from table, in the Column [Client Name].

My request is need to prevent Names that Start or End with a [:space:] or other special Character [:punct:], excluding the dot '.' - at the end of the Name. The Idea is to pull Names that are Possible inconsistencies.

examples that must appear:

  1. 'GEORGE & SON ' - has an extra space at the end.
  2. '-GEORGE & SON' - has an extra '-' at the start.
  3. '&GEORGE & SON' - has an extra '&' at the start.
  4. '-GEORGE & SON S.A.' - has an extra '-' at the start. The Dot '.' at the end it's not a problem.
  5. 'GEORGE & SON..' - has not one, but two dots at the end. That is an exception for the strings that ends with more than one '.'; they are also bad names.

examples that must not appear: 'GEORGE & SON.' - Only has an extra '.', at the end.

I'm using the expression: REGEXP_LIKE(col, '(^[[:punct:]]|[[:punct:]]$)|(^[[:space:]]|[[:space:]]$)') But in spite of retrieving Names that start or end with space or special characters, is also pulling the ones that have a dot '.' on last character.

Can anybody help me, please?

Leopoldo Fernandes Lisbon - Portugal

3
  • Bem vindo ao Stack Overflow em Português! Por favor clique em editar e traduza a pergunta para português.
    – hkotsubo
    Commented 3/04/2019 às 13:10
  • Peço imensa desculpa. Coloquei esta questão no Stackoverflow americano e acabei por obter resposta satisfatória. Agradeço o comentário hkhotsubo.
    – LEOPOLDO
    Commented 10/04/2019 às 14:31
  • Tudo bem, vc ainda pode editar a pergunta e deixá-la em português, se quiser. Ou apagá-la, se achar que não é mais necessária. :-)
    – hkotsubo
    Commented 10/04/2019 às 14:33

0

Você deve fazer log-in para responder a esta pergunta.

Pesquise outras perguntas com a tag .