Question : Rounded number in SQL Tabele

I have a query that loads data into a number field in a SQL table.  The query rounds the number properly, but once the data has been loaded to the table, the value increase much more than expected.  The field is Invoice Quantity and the data type is number(18.0).  I'm sending this data to a system that requires who numbers.  When I perform the select query with rounding I get 11,517,668.  When I pull data from the same field in the table I get 11,520,687.  Is there someone I need to do to the table to make sure the values stay the same?

Answer : Rounded number in SQL Tabele

I think it should be something like this
1:
2:
3:
4:
5:
SELECT
CASE WHEN BUSINESS_ORG_ID='001' THEN CONVERT(DECIMAL(18,0),(DS_INVOICE_QTY/1000))
ELSE CONVERT(DECIMAL(18,0), DS_INVOICE_QTY) END AS [DS INVOICE QTY]
FROM DS_FINAL_TRANSFORMATION
WHERE BUSINESS_ORG_ID='001' AND INVOICE_DATE>='01/01/2009' AND INVOICE_DATE<='12/31/2009' 
Random Solutions  
 
programming4us programming4us