All Forums Database
03 Dec 2015
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 DISTINCT wc_id, mfg_stg_nm 

         FROM SUPL_PLN_SCH.v_loc_map



   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_D IST_WC_FROM_SITE.WC_ID)


  ( SELECT DISTINCT wc_id, mfg_stg_nm 

       FROM SUPL_PLN_SCH.v_loc_map


   ON (t_Supl_Pln_Sch.v_supl_pln_sch_inv.to_loc_id=LV_INVSUM M_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

yudakovalex 1 post Joined 06/14
11 Dec 2015

Need more info about datatypes.
Btw you can equate timestamp to date without cast. Current_timestamp = date - works fine.

ToddAWalter 316 posts Joined 10/11
11 Dec 2015

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.

manasanis 1 post Joined 10/11
12 Jul 2016

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. 

ToddAWalter 316 posts Joined 10/11
13 Jul 2016

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.

You must sign in to leave a comment.