3899 Internal error in teradata SQL parser

Database

3899 Internal error in teradata SQL parser

Hi ,

Please help me know how the below issue can be resolved.

Im trying to equate a timestamfield(casting to date formate ) with current_date in the where clause. and im getting 3899 Internal error in teradata SQL parser error.

Kindly help to know me how i can modify the code..Requirement is basically to retrive only current date data invariable of the timestamp.

SELECT

  t_Supl_Pln_Sch.v_supl_pln_sch_inv.ITM_ID,

  t_Supl_Pln_Sch.v_itm_char_reltn_denom.ITM_DSC,

  LV_INVSUMM_DIST_WC_FROM_SITE.MFG_STG_NM,

  LV_INVSUMM_DIST_WC_TO_SITE.MFG_STG_NM,

  t_Supl_Pln_Sch.v_supl_pln_sch_inv.loc_id,

  t_Supl_Pln_Sch.v_supl_pln_sch_inv.to_loc_id

 FROM

  ( 

      SELECT DISTINCT wc_id, mfg_stg_nm 

         FROM SUPL_PLN_SCH.v_loc_map

  )  LV_INVSUMM_DIST_WC_FROM_SITE

   RIGHT OUTER JOIN t_Supl_Pln_Sch.v_supl_pln_sch_inv 

   ON (t_Supl_Pln_Sch.v_supl_pln_sch_inv.loc_id=LV_INVSUMM_DIST_WC_FROM_SITE.WC_ID)

     LEFT OUTER JOIN

  ( SELECT DISTINCT wc_id, mfg_stg_nm 

       FROM SUPL_PLN_SCH.v_loc_map

  )  LV_INVSUMM_DIST_WC_TO_SITE

   ON (t_Supl_Pln_Sch.v_supl_pln_sch_inv.to_loc_id=LV_INVSUMM_DIST_WC_TO_SITE.WC_ID)

   INNER JOIN t_Supl_Pln_Sch.v_itm_char_reltn_denom

  ON (t_Supl_Pln_Sch.v_supl_pln_sch_inv.ITM_ID = t_Supl_Pln_Sch.v_itm_char_reltn_denom.ITM_ID)

WHERE  CAST(t_Supl_Pln_Sch.v_supl_pln_sch_inv.snpsht_dt AS DATE) =  DATE

4 REPLIES
Teradata Employee

Re: 3899 Internal error in teradata SQL parser

Need more info about datatypes.

Btw you can equate timestamp to date without cast. Current_timestamp = date - works fine.

Teradata Employee

Re: 3899 Internal error in teradata SQL parser

An Internal error like this should be reported to the Teradata support center. They will most likely need the DDL of the views/tables referenced. They will also likely be able to provide a workaround for your issue.

Re: 3899 Internal error in teradata SQL parser

What was the workaround provided by Teradata for this issue? we are getting similar issue on one of Preprod environment but not on QA environment. 

Teradata Employee

Re: 3899 Internal error in teradata SQL parser

It is really best to open a new incident with Teradata support. It is not possible to determine if this issue is the same as the one in the original thread without analysis of the details.