Archives of the TeradataForum
Message Posted: Mon, 01 Sep 2014 @ 11:20:32 GMT
Could one some help me to debug this below issue.
INSERT INTO DB.TGT_TAB APP_NM , CLNT_VAL , CLAIM_NO , SEQ , PM_AREA_TXT ) SELECT NR.APP_NM ,(SELECT CLNT_VAL FROM DB.CLNT WHERE A_CLNT_ID =NR.CLIENT_CD) AS CLNT_VAL ,NR.CLAIM_NO ,NR.SEQ ,(CASE WHEN( LENGTH(NR.PM_AREA_TXT) = 13 AND SUBSTRING(TRIM(NR.PM_AREA_TXT),7,1) <> '' )THEN SUBSTRING(TRIM(NR.PM_AREA_TXT),7,1) WHEN (LENGTH(NR.PM_AREA_TXT) > 13 AND SUBSTRING(TRIM(NR.PM_AREA_TXT),8,1) <> '' )THEN SUBSTRING(TRIM(NR.PM_AREA_TXT),8,1) ELSE 'UNK' END )AS PM_AREA_TXT FROM DB.SRC_TAB NR;
We are using Teradata version 14.10. I can run and load this target table in SQLA but if I execute them in BTEQ, it throws me below error
*** Failure 3706 Syntax error: expected something between ')' and ','. Statement# 1, Info =308 *** Total elapsed time was 3 seconds.
What could be the problem? ?Any help would be greatly appreciated!!
|Copyright 2016 - All Rights Reserved|
|Last Modified: 23 Jun 2019|