Archives of the TeradataForum
Message Posted: Fri, 24 Mar 2006 @ 21:56:05 GMT
Subj: | | Re: Valid criteria that returns zero rows |
|
From: | | Fred W Pluebell |
ODBC doesn't support exact representation of numeric values over 15 decimal digits, so the values displayed by the first query are inexact.
SQL Assistant has an option that implicitly forces a CAST to CHAR for large decimal fields so the exact values will be displayed, or you can
explicitly do that yourself when you retrieve the data, e.g.
SELECT ID_COL, CAST(CAST(ID_COL AS FORMAT '9(18)') AS CHAR(18))
FROM TABLE WHERE DATE = '1/1/06';
If you supply numbers as constants in the SQL statement, they can be over 15 digits long with no problem. But if you supplied them as
parameters, you would be subject to the same limitation of precision and might need to use a CHAR/VARCHAR parameter and have the DBMS CAST back to
DECIMAL.
There are other reasons why you might not want to use 3.04.00.00 ODBC driver, though. You can download the latest patch level from
www.teradata.com
|