Cara Douglas, que caracterada tem aí, rsrsrs

Vai me ser muito útil... muito obrigado.




2013/5/13 Douglas Fabiano Specht <[email protected]>

>
>
>
> Em 10 de maio de 2013 10:37, Dickson S. Guedes <[email protected]>escreveu:
>
>> Em Sex, 2013-05-10 às 10:11 -0300, Marcelo da Silva escreveu:
>>
>> [... corte ...]
>>
>> > Será que tem como fazer uma função para percorrer uma String e
>> verificar se
>> > o cada caractere tem compatível com LATIN1 ?
>>
>>
>> Re-inventar a roda? Veja a função 'convert' em [1].
>>
>>
>> http://www.postgresql.org/docs/current/static/functions-string.html
>>
>> --
>> Dickson S. Guedes
>> mail/xmpp: [email protected] - skype: guediz
>> http://guedesoft.net - http://www.postgresql.org.br
>> http://www.rnp.br/keyserver/pks/lookup?search=0x8F3E3C06D428D10A
>>
>> _______________________________________________
>> pgbr-geral mailing list
>> [email protected]
>> https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral
>>
>>
> bom dia,
> segue a que eu utilizo, veja se lhe serve:
>
>  CREATE OR REPLACE FUNCTION retira_acentuacao1(p_texto text)
>   RETURNS text AS
>  $BODY$
>  Select translate($1,
>  
> 'áâãäåaaaÁÂÃÄÅAAAèééêëeeeeeEEEÉEEìíîïìiiiÌÍÎÏÌIIIóôõöoooÒÓÔÕÖOOOùúûüuuuuÙÚÛÜUUUUçÇ<>!@#$%¨*()_+={}[]?;:|*~^´`¨æÆø£Øƒªº¿®½¼ßµþýÝ€§¬©¢¥¤ðÐÞÞ¶
> ',  --no final tem tbm o 144 da tabela ascii
>  
> 'áâãaaaaaÁÂÃAAAAAèééêeeeeeeEEEÉEEìíîiìiiiÌÍÎIÌIIIóôõooooÒÓÔÕOOOOùúûuuuuuÙÚÛUUUUUcC
>                                                          '
>   );
>  $BODY$
>  LANGUAGE sql VOLATILE
>  COST 100;
>
>
> update cadastro
> set
> endereco=retira_acentuacao1(endereco),
>
>
> --
>
> Douglas Fabiano Specht
>
> _______________________________________________
> pgbr-geral mailing list
> [email protected]
> https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral
>
>


-- 
Marcelo Silva
----------------------------------------------------------------
Desenvolvedor Delphi / PHP
My Postgres database
Cel.: (11) 99693-4251
_______________________________________________
pgbr-geral mailing list
[email protected]
https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral

Responder a