Jump to content
Fórum Script Brasil
  • 0

converter colunas numericas em padrão brasileiro


lariuxi
 Share

Question

tenho uma tabela com duas colunas (debito e credito ) de valores numericos,  com o comando coalesce tem o resultado outra coluna saldo.  mas não estou conseguindo transformar a coluna saldo para numeros de padrão brasileiro  (  ponto nas milhares e virgula nos decimais), apenas as colunas debito e credito aparecem padrão brasileiro atraves do to_char.  segue a linha abaixo:

SELECT  id,  to_char(credito, '9G999G999D99'), to_char(debito, '9G999G999D99'),  SUM (COALESCE (credito,0) - COALESCE (debito,0)) OVER (ORDER BY id)  AS saldo FROM caixa;

credito     debito       saldo

1.000,00   500,00     500.00

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Forum Statistics

    • Total Topics
      149.9k
    • Total Posts
      646.8k
×
×
  • Create New...