Precision error in FLOAT type constant or during implicit conversions

Connectivity

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.

4 REPLIES
Teradata Employee

Re: Precision error in FLOAT type constant or during implicit conversions

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.

Re: Precision error in FLOAT type constant or during implicit conversions

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' 

Teradata Employee

Re: Precision error in FLOAT type constant or during implicit conversions

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.

Re: Precision error in FLOAT type constant or during implicit conversions

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,

tera_ble