Desktop productivity for business analysts and programmers

ERROR : Not sure why it's not recognizing one of the variables - ENRLMT_RGN_CD not found in....

Reply
Frequent Contributor
Posts: 78

ERROR : Not sure why it's not recognizing one of the variables - ENRLMT_RGN_CD not found in....

*- FOR JAN 2018 -*;

2413

2414 %LET FM = '03'; *- FISCAL MONTH -*;

2415 %LET FY = '2018'; *- FISCAL YEAR -*;

2416

2417 proc sql ;

2418 CONNECT TO Teradata as tera (authdomain="T2017_IW_Prod" TDPID="edwfsp.fs.nnnnnn.com");

2419 CREATE TABLE &NAME..ELIG01 AS

2420 SELECT * FROM CONNECTION TO tera

2421 (SELECT

2422 SPNSR_SSN AS SPSSN,

2423 BENE_STATE_CD AS BENEST,

2424 BENE_ZIP_CD AS BENEZIP,

2425 CMN_BENE_CTGRY_CD AS BENECAT,

2426 BENE_ELGBLTY_FSCL_YR AS FYEAR,

2427 BENE_ELGBLTY_FSCL_MM AS FMONTH,

2428 ALTRNT_CARE_VAL_CD AS ACVALUE,

2429 HCDP_PLAN_CVRG_CD AS HCDP,

2430 ENRLMT_DMIS_ID AS ENRDMIS,

2431 ENRLMT_RGN_CD AS ENRREG,

2432 T3_ENRLMT_RGN_CD AS T3ENRREG,

2433 DOD_EDI_PRSN_ID AS EDENTER,

2434 PHI_IND AS SCRAMBLE,

2435 UNDRWRTTN_IND AS UNDFLAG,

2436 T3_UNDRWRTTN_IND AS T3UNDFLAG,

2437 DRVD_LINK AS LINK,

63 The SAS System 21:09 Monday, May 7, 2018

2438 DRVD_SPCL_GRP_DESC AS SPCLGRP,

2439 DRVD_BENE_STUS_DESC AS BENESTAT

2440

2441 FROM DEERS_DTL

2442 WHERE BENE_ELGBLTY_FSCL_MM = &FM AND

2443 BENE_ELGBLTY_FSCL_YR = &FY

2444 );

ERROR: Teradata prepare: Column ENRLMT_RGN_CD not found in IW_PRD_AV.DEERS_DTL. SQL statement was: SELECT SPNSR_SSN AS SPSSN,

BENE_STATE_CD AS BENEST, BENE_ZIP_CD AS BENEZIP, CMN_BENE_CTGRY_CD AS BENECAT, BENE_ELGBLTY_FSCL_YR AS FYEAR,

BENE_ELGBLTY_FSCL_MM AS FMONTH, ALTRNT_CARE_VAL_CD AS ACVALUE, HCDP_PLAN_CVRG_CD AS HCDP, ENRLMT_DMIS_ID AS ENRDMIS,

ENRLMT_RGN_CD AS ENRREG, T3_ENRLMT_RGN_CD AS T3ENRREG, DOD_EDI_PRSN_ID AS EDENTER, PHI_IND AS SCRAMBLE, UNDRWRTTN_IND AS

UNDFLAG, T3_UNDRWRTTN_IND AS T3UNDFLAG, DRVD_LINK AS LINK, DRVD_SPCL_GRP_DESC AS SPCLGRP, DRVD_BENE_STUS_DESC AS BENESTAT

FROM DEERS_DTL WHERE BENE_ELGBLTY_FSCL_MM = '03' AND BENE_ELGBLTY_FSCL_YR = '2018'.

NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.

2445 %PUT &SQLXMSG &SQLXRC;

Column ENRLMT_RGN_CD not found in IW_PRD_AV.DEERS_DTL 5628

2446

NOTE: The SAS System stopped processing this step because of errors.

NOTE: PROCEDURE SQL used (Total process time):

real time 0.25 seconds

cpu time 0.02 seconds

 

2447 PROC PRINT UNIFORM DATA=ELIG01 (OBS=10);

ERROR: File WORK.ELIG01.DATA does not exist.

2448 TITLE1 "10 OBS FROM FACT003.A082633.ELIG01.THRU1712.SASS";

2449 TITLE2 "FACT003.ROUTINE.T7-OP8(THRU1712) - JSG10";

2450 TITLE3 "FM: &FM FY: &FY";

2451 RUN;

NOTE: The SAS System stopped processing this step because of errors.

NOTE: PROCEDURE PRINT used (Total process time):

real time 0.00 seconds

cpu time 0.00 seconds

 

2452

Super User
Posts: 3,768

Re: ERROR : Not sure why it's not recognizing one of the variables - ENRLMT_RGN_CD not found in....

[ Edited ]

The error is clear: Column ENRLMT_RGN_CD not found in IW_PRD_AV.DEERS_DTL

 

Teradata is reporting that it can't find that column in the table. Check with your DBA to resolve.

 

You could also try taking out that column from your query to prove if it works correctly without it or not.

Ask a Question
Discussion stats
  • 1 reply
  • 97 views
  • 0 likes
  • 2 in conversation