All Forums Connectivity
15 Jun 2013
Precision error in FLOAT type constant or during implicit conversions

I received this error when i run the query on my app, but when i run the same query on teradata studio, it run fine. Why???
I use jdbc driver for run this query.

tomnolan 594 posts Joined 01/08
17 Jun 2013

We would need more information to help you.
Please post the complete exception stack trace, the query SQL text, the DDL for any tables and/or other database objects that the query references, and the Teradata Database version that you are using.

ananthteradata 1 post Joined 07/13
16 Jul 2013

i have a similar issue,Executed the following query and got the error
select * from  DD_DDD_DDD.MM_KK_OL  where smp_ky='20,110,817,173,258,994,034,000,044' 

Fred 1096 posts Joined 08/04
16 Jul 2013

When one of the terms is numeric and the other is a string, Teradata will attempt to implicitly convert both to FLOAT in order to do the comparison. Make the data types match; e.g. use a numeric constant to compare with a numeric column, or use an explicit CAST to convert one or both fields.

tera_ble 1 post Joined 03/14
12 Mar 2014

In the case of something like this,

 select * from  DD_DDD_DDD.MM_KK_OL  where smp_ky='20,110,817,173,258,994,034,000,044' 

remove the commas.

 select * from  DD_DDD_DDD.MM_KK_OL  where smp_ky='20110817173258994034000044' 

now you are in business!
good luck,

You must sign in to leave a comment.