0
I have a field qtfornecedor
of the kind Numeric(10, 3). When its stored value is 10, he returns me in consultation as '10,000'.
I tried to manipulate the value with a IIF
, works for when the stored value is integer, example 10. But for cases where the stored value is decimal, such as '10,000', he returns me whole 10.
SELECT
cdempresa
,nmempresa
,cdproduto
,nmproduto
,IIF(RIGHT(qtfornecedor,3) = 0, FORMAT(qtfornecedor, '#'), FORMAT(qtfornecedor, '##########.###')) as qtfornecedor
,unidade
,vlfornecedor
FROM
[dbo].[negociacao]
WHERE
nrochamado = 11104
"When the stored value of it is 10, it returns me in the query as '10,000'." well if that’s wrong, then you say "But for cases where the stored value is decimal, like '10,000', it returns to me integer 10." I honestly don’t understand, after all whatever comes back???
– Ricardo Pontual