Format decimal places directly in SQL command in Firebird

Question:

I have a ESTOQUE table containing a field called QTDE , this field has 3 decimal places.

What would be the command to return directly from SQL formatted with 3 places? Because the integer values ​​are returning without the places.

I use: Firebird 2.0 / Field: Decimal(15,3)

Answer:

Try like this:

SELECT cast(seu_campo AS NUMERIC(15,3)) FROM sua_tabela

I believe your intention is to show this on the screen so try this:

select cast(seu_campo as varchar(10)) from sua_tabela
Scroll to Top