3754: Precision Error Float type constant or during implicit conversions

Database

3754: Precision Error Float type constant or during implicit conversions

Hi,

I am hopeful that someone can help with this code I am trying to execute.   The 3754 error prevents me from getting records for some reason that I cannot grasp.  Here is the code:

SELECT
DISTINCT
      '4' AS RPT_ID
      ,'NOT STARTED' AS REPORT_TYPE       
      , A.WARNINGS_ID AS INCDNT_ID
      , E.TAXONOMY_DESC AS CAT
      , (CURRENT_DATE - CAST(B.ACTN_TSTMP AS DATE)) AS DAYS_OUT
      , CASE
         WHEN (CURRENT_DATE - CAST(B.ACTN_TSTMP AS DATE)) <= 30 THEN '1. 0 - 30 DAYS'
         WHEN (CURRENT_DATE - CAST(B.ACTN_TSTMP AS DATE)) <= 60 THEN '2. 31 - 60 DAYS'
         WHEN (CURRENT_DATE - CAST(B.ACTN_TSTMP AS DATE)) <= 90 THEN '3. 61 - 90 DAYS'
       ELSE
         '4. 90 + DAYS'
       END AS AGE
      ,  A.REASON AS RSK_REAS
      ,  A.ASSGNMT AS INCDNT_REC_TYP
      ,  F.STATUS_NAME AS STS_DESC_EN
      ,  D.AGENT_NM AS USR_FN
      ,  D.AGENT_NM AS USR_LN
      ,  A.ALERT AS TEAM_ID  /* THIS IS A SUBSTITUTION FOR MGR_LAN_ID*/
      /*, CMPLX - CONTINGENT UPON CHANGE REQUEST */
      , CURRENT_DATE AS REPORT_DATE
  
FROM
        db2.WARNINGS_TB A
 
INNER
JOIN
 
        db2.WORKGROUP_DLY B
ON
 
        B.ENTY_KEY =  A.ALERT_ID
INNER
JOIN
        db2.ACTION_LOG C
ON
        C.ENTY_KEY = B.ENTY_KEY
INNER
JOIN
 
         db2.USERSGROUP D
ON
         D.USRID = C.USRID
INNER
JOIN
        db2.DOMAINS E
ON
         E.DOMN_ID=B.DOMN_ID
INNER
JOIN
        db2.WORKPROCESS_DLY F
ON
        B.WKPRC_STS_ID = F.WKPRC_STS_ID
WHERE
       B.WKPRC_STS_ID IN ('1004','1007','1009')

Thanks in advance for your help.

2 REPLIES
Teradata Employee

Re: 3754: Precision Error Float type constant or during implicit conversions

If you try to compare a character field with a numeric field, the Teradata default is to implicitly convert both to FLOAT. Look at the DDL (e.g. do SHOW for the above statement) and figure out where this is occurring. Then do explicit CAST to a compatible datatype of higher numeric precision (perhaps BIGINT or DECIMAL(38)).

Re: 3754: Precision Error Float type constant or during implicit conversions

Thanks for the help Fred.  It looks like the join with enty_key to alert_id has a varchar to decimal relationship.  I just performed a cast to make the join equal.  So were right on the money with your answer!