Thousands Separator

2

I have this query

  SELECT CONVERT(numeric(18,0), CAST((g.SI_Existencia) * gg.SI_Costo_Promedio AS MONEY),1) 
  from SI_Inventario_Teorico_QAD g
  INNER JOIN SI_Maestro_Ref_QAD gg ON g.SI_Articulo = gg.SI_Num_Articulo
  WHERE SI_Articulo = 200038

I'm trying to make the result show it to me in thousands separator so the fields g.SI_Existencia and gg.SI_Costo_Promedio are numeric(18,0)

g.SI_Existencia = 58
gg.SI_Costo_Promedio = 41040.010
    
asked by Eduard 24.07.2017 в 19:20
source

2 answers

1

Eduard, as stated by Salo in his response, I would like to add the following to the FORMAT statement.

If the expected value in the query wants it without decimals, you can write it like this:

   Format(gg.SI_Costo_Promedio , 'N0', 'en-us') = 41040

If the expected value in the query wants it with decimals, you can write it like this:

   Format(gg.SI_Costo_Promedio , 'N2', 'en-us') = 41040.01

The number of decimals that I hope you show me I must put it in FORMAT format.

    
answered by 26.07.2017 в 04:26
0

You can use FORMAT (Value, 'Format') Where 'Format' can be N or C

link

Greetings

    
answered by 24.07.2017 в 20:16