Em 29 de junho de 2015 17:27, PAULO <[email protected]> escreveu:
> Olá Pessoal, > Boa tarde! > Preciso substituir caracteres em tempo de execução e estou tentando: > > > > SELECT TRANSLATE(info_fisco, 'var2', '0.65') from cfop where cod_ cfop = > '5102'; > Por que não usar diretamente um replace[1]? > > > "PERMITE O APROVEITAMENTO DE CREDITO DE ICMS NO VALOR DE R$ *var1* > CORRESPONDENTE À ALIQUOTA DE *var2*% , NOS TERMOS DO > > ART 23 DA LC 123" > > > > -Primeiro select 100%., no Segundo: > > > > SELECT TRANSLATE(info_fisco, 'var1', '123.45') from cfop where cod_ cfop = > '5102'; > > > Uma outra função que tu pode usar pra fazer esse tipo de formatação é o format[2]. [1] http://www.postgresql.org/docs/9.4/static/functions-string.html#FUNCTIONS-STRING-SQL [2] http://www.postgresql.org/docs/9.4/static/functions-string.html#FUNCTIONS-STRING-FORMAT -- Sebastian Webber http://swebber.me
_______________________________________________ pgbr-geral mailing list [email protected] https://listas.postgresql.org.br/cgi-bin/mailman/listinfo/pgbr-geral
