Home » Infrastructure » Windows » Error "Invalid precision for decimal data type"
Error "Invalid precision for decimal data type" [message #101167] Tue, 01 June 2004 08:11 Go to next message
sdmcnitt
Messages: 2
Registered: June 2004
Junior Member
I am working with Microsoft ODBC for Oracle (msorcl32.dll 2.573.6200) in a pass-thru query in Access 2000 SR-1. I have the client software for Oracle 9i.

I keep getting "Invalid precision for decimal data type" in ODBC but this does not happen in SQL*Plus. In playing around with the query, some interesting (and frustrating) things are found. For example:

--this works!!

SELECT ID_NUMBER, nvl(CLN_COMMIT_FEES, 0)

FROM SOME_TABLE

WHERE UD_DATA_SOURCE = 'CLC'

AND AS_OF_DATE = TO_DATE('03/31/2004','mm/dd/yyyy')

--but this doesn't??? WTF?

SELECT CL.ID_NUMBER,

nvl(CL.CLN_COMMIT_FEES, 0)

FROM SOME_TABLE CL

WHERE CL.UD_DATA_SOURCE = 'CLC'

AND CL.AS_OF_DATE = TO_DATE('03/31/2004','mm/dd/yyyy')

The fees column is NUMBER(14,2)

Again, they both work in SQL*Plus so I am concentrating on ODBC issues. I am going to request Office SP-3 first.
Re: Error "Invalid precision for decimal data type" [message #101291 is a reply to message #101167] Fri, 23 July 2004 14:51 Go to previous messageGo to next message
ajessop
Messages: 2
Registered: July 2004
Junior Member
I get the same error when trying to use a sum() function, but I don't get the error when not using sum() on the same column in the same table.

I have Office SP 3.
Re: Error "Invalid precision for decimal data type" [message #101335 is a reply to message #101291] Fri, 13 August 2004 01:58 Go to previous messageGo to next message
Bala
Messages: 205
Registered: November 1999
Senior Member
Try increasing the datatype size that is specified ,say if itz given as (11,-127) increase the 11 to 25. It shud wrk.
Re: Error "Invalid precision for decimal data type" [message #101341 is a reply to message #101167] Tue, 17 August 2004 15:02 Go to previous messageGo to next message
Matt W
Messages: 1
Registered: August 2004
Junior Member
It appears no one really gives a darn. Need this too.
Re: Error "Invalid precision for decimal data type" [message #144479 is a reply to message #101167] Wed, 26 October 2005 13:07 Go to previous message
fox3c
Messages: 1
Registered: October 2005
Junior Member
Don't know if anyone still needs this. But one possible solution is to bracket your "compound" column and rename it, for example in your query:

SELECT CL.ID_NUMBER,

(nvl(CL.CLN_COMMIT_FEES, 0)) as NewField

FROM SOME_TABLE CL

or some such. Access gets confused easily, you have to be careful how you bracket (or don't bracket things), how you use double and single quotes etc. In this case it likely got confused over the data type coming from the nvl function. I've seen the same thing happen with simple multiplications, concatenations, or other functions when Access has trouble converting the result of the calculation or function into one of its own datatypes. Hope this helps anyone who needs it.


[Updated on: Wed, 26 October 2005 13:12]

Report message to a moderator

Previous Topic: Client install on Windows XP SP2
Next Topic: Set Define OFF for Ampersands: Missing or Invalid Option
Goto Forum:
  


Current Time: Tue Apr 23 09:21:23 CDT 2024