Page 1 of 1

Warning

Posted: Thu Dec 09, 2004 3:59 pm
by ksmurthys
Hi ALL,

My job is simple, i tried to insert data into a decimal column(i.e decimal(12,2)) i am getting the following error:

factpossample1.CTransformerStage1.DSLink4: DSD.BCIPut call to SQLExecute returned informational message.
SQLSTATE=01004, DBMS.CODE=0
[Ardent][SQL Client][ODBC][Microsoft][ODBC SQL Server Driver]Fractional truncation

CUST_KEY = 1
PROD_KEY = 322831
STORE_KEY = 16076
CUST_ITEM = "311785 "
Year = 2004
Month = 11
Company = "0"
Vendor = "17561"
Prod_line = " "
Dollar_Amount = 0.67
Units = 0

Please help me out how to resolve this issue..

Thanks,
Sriram.

Posted: Thu Dec 09, 2004 8:54 pm
by ray.wurlod
It's a warning rather than an error, and it's generated by the ODBC driver rather than by the database server.

It means that, somewhere, a decimal value has been truncated. The apparent culprit is Dollar_Amount. The CURRENCY data type in SQL Server expects four decimal places; you have only supplied two. It might be this. To suppress the warning, if this is indeed the fault, send 0.6700 to Dollar_Amount.

Posted: Thu Dec 09, 2004 9:01 pm
by vmcburney
Would you get a warning writing a two decimal value to a four decimal field? I thought it would only happen if the target has less precision then the source. Could the job be writing to a field that supports no decimal places?

Posted: Thu Dec 09, 2004 10:48 pm
by ray.wurlod
One word. Micro$oft.