Firebird - function for decimal places and thousands

2

There is some native function of Firebird that returns me the currency format similar to Brazilian or some stored procedure that does this service.

Example: #. ###, ##

  • The point would be the thousands of houses, millions, etc.
  • The comma would be the decimal places, in case I wanted it to return two

In mysql it would look like this:

select format(<atributo>,2,'de_DE')
    
asked by anonymous 07.07.2015 / 15:15

1 answer

2

Try this cast(tb.SEU_FIELD AS NUMERIC(15,4)) as Saldo or             cast( replace(tb.SEU_FIELD,',','.') as decimal(18,4))

These are the only ways I know to format numbers.

    
25.05.2018 / 21:16