Subject | formating a numeric column |
---|---|
Author | Sergio H. Gonzalez |
Post date | 2008-09-25T18:51:20Z |
[FB2.1]
Hi I have a column defined as numeric(18,3) and I want to cast it to char but
with 2 decimal places. I'm doing this and it works fine, but I'm curious if this
is the "proper" way to do it...
SELECT
CAST(CAST(PAGOS_EFECTIVO.IMPORTE AS NUMERIC(18,2)) AS VARCHAR(20))
Thanks!
-s
Hi I have a column defined as numeric(18,3) and I want to cast it to char but
with 2 decimal places. I'm doing this and it works fine, but I'm curious if this
is the "proper" way to do it...
SELECT
CAST(CAST(PAGOS_EFECTIVO.IMPORTE AS NUMERIC(18,2)) AS VARCHAR(20))
Thanks!
-s