éh to_ascii é mais elegante

2009/3/11 [email protected] <[email protected]>

> Também dá pra utilizar to_ascii
>
> select to_ascii('açucar é doce');
>    to_ascii
> ---------------
>  acucar e doce
> (1 row)
>
>
> http://pgdocptbr.sourceforge.net/pg80/functions-string.html
>
>
> 2009/3/11 Shairon Toledo <[email protected]>
>
> Já tentou usar o translate?
>>
>> select 'acucar' = translate('açucar','ç','c')
>>
>> t
>>
>>
>> 2009/3/11 JacksonWeber <[email protected]>
>>
>>
>>> Alguém sabe me dizer se tem uma função ou modo de em uma consulta eu
>>> tenho lá
>>> gravado uma informação 'AÇUCAR DOCE' e ao fazer a consulta eu
>>> simplesmente
>>> desprezar o 'Ç' colocando somente 'C' e retornar todos as informações que
>>> estão gravadas tanto em 'C' e 'Ç'.
>>>
>>> create table tabela1 (c1 varchar(50));
>>>
>>> insert into tabela1 values ('AÇUCAR DOCE');
>>>
>>> select * from tabela1 where c1 like '%ACU%';
>>>
>>> Tem como ele me retornar 'AÇUCAR DOCE'.
>>> --
>>> View this message in context:
>>> http://www.nabble.com/Caracteres-tp22453053p22453053.html
>>> Sent from the PostgreSQL - Brasil mailing list archive at Nabble.com.
>>>
>>> _______________________________________________
>>> pgbr-geral mailing list
>>> [email protected]
>>> https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral
>>>
>>
>>
>>
>> --
>> [ ]'s
>> Shairon Toledo
>> http://www.hashcode.eti.br
>>
>> _______________________________________________
>> pgbr-geral mailing list
>> [email protected]
>> https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral
>>
>>
>
>
> --
> Diego Mancilha
>



-- 
[ ]'s
Shairon Toledo
http://www.hashcode.eti.br
_______________________________________________
pgbr-geral mailing list
[email protected]
https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral

Responder a