Here is my dilemma,
When my WORK.bn2000 table hits the IN statement in verifies that a bus_reg_nb(PK) is not in the BN2001 table. The problem is that as soon as i reference a second
table(t2_income_stmt t2_is), it gives me a shared memery address error. I need to use the 2 tables in the query in order for it to function properly. The Error message I receive is as follows.
/*
Error: Read Access Violation In Task [SQL]
Exception occurred at [5EEF7EFF]
Task Traceback
*/
PROC SQL;
CREATE TABLE WORK.bn2001 as
SELECT t2_fd.bus_reg_nbr,t2_fd.ref_yr_cd,t2_fd.fpe_dt,t2_fd.fps_dt
FROM tms.t2_financial_declaration t2_fd, tms.t2_income_stmt t2_is
WHERE t2_fd.ref_yr_cd = '2001' AND
T2_FD.REF_YR_CD = t2_is.REF_YR_CD AND
T2_FD.BUS_REG_NBR = t2_is.BUS_REG_NBR AND
T2_FD.BN_ACCT_SQNBR = t2_is.BN_ACCT_SQNBR AND
T2_FD.FPE_DT = t2_is.FPE_DT AND
T2_FD.FPS_DT = t2_is.FPS_DT AND
(t2_fd.fpe_dt - t2_fd.fps_dt) >= 30 AND
(t2_fd.dnr_find_mdul_nbr = '0' or
t2_fd.dnr_find_mdul_nbr = '1' or
t2_fd.dnr_find_mdul_nbr is null)
ORDER by T2_FD.fpe_dt desc
;
QUIT;
PROC SORT data=WORK.bn2001 nodupkey;
by bus_reg_nbr ref_yr_cd;
QUIT;
PROC SQL;
CREATE TABLE WORK.bn2000 as
SELECT t2_fd.bus_reg_nbr,
t2_fd.ref_yr_cd,
t2_fd.fpe_dt,
t2_fd.fps_dt
FROM tms.t2_financial_declaration t2_fd, tms.t2_income_stmt t2_is
WHERE t2_fd.ref_yr_cd = '2001' AND
T2_FD.REF_YR_CD = t2_is.REF_YR_CD AND
T2_FD.BUS_REG_NBR = t2_is.BUS_REG_NBR AND
T2_FD.BN_ACCT_SQNBR = t2_is.BN_ACCT_SQNBR AND
T2_FD.FPE_DT = t2_is.FPE_DT AND
T2_FD.FPS_DT = t2_is.FPS_DT AND
(t2_fd.fpe_dt - t2_fd.fps_dt) >= 30 AND
(t2_fd.dnr_find_mdul_nbr = '0' or
t2_fd.dnr_find_mdul_nbr = '1' or
t2_fd.dnr_find_mdul_nbr is null) AND
t2_fd.bus_reg_nbr not in
(SELECT bus_reg_nbr FROM work.bn2001 )
;
QUIT;
PROC SORT data = work.bn2000 ;
by descending fpe_dt ;
QUIT;
PROC SORT data= work.bn2000 nodupkey;
by bus_reg_nbr ref_yr_cd;
QUIT;
When my WORK.bn2000 table hits the IN statement in verifies that a bus_reg_nb(PK) is not in the BN2001 table. The problem is that as soon as i reference a second
table(t2_income_stmt t2_is), it gives me a shared memery address error. I need to use the 2 tables in the query in order for it to function properly. The Error message I receive is as follows.
/*
Error: Read Access Violation In Task [SQL]
Exception occurred at [5EEF7EFF]
Task Traceback
*/
PROC SQL;
CREATE TABLE WORK.bn2001 as
SELECT t2_fd.bus_reg_nbr,t2_fd.ref_yr_cd,t2_fd.fpe_dt,t2_fd.fps_dt
FROM tms.t2_financial_declaration t2_fd, tms.t2_income_stmt t2_is
WHERE t2_fd.ref_yr_cd = '2001' AND
T2_FD.REF_YR_CD = t2_is.REF_YR_CD AND
T2_FD.BUS_REG_NBR = t2_is.BUS_REG_NBR AND
T2_FD.BN_ACCT_SQNBR = t2_is.BN_ACCT_SQNBR AND
T2_FD.FPE_DT = t2_is.FPE_DT AND
T2_FD.FPS_DT = t2_is.FPS_DT AND
(t2_fd.fpe_dt - t2_fd.fps_dt) >= 30 AND
(t2_fd.dnr_find_mdul_nbr = '0' or
t2_fd.dnr_find_mdul_nbr = '1' or
t2_fd.dnr_find_mdul_nbr is null)
ORDER by T2_FD.fpe_dt desc
;
QUIT;
PROC SORT data=WORK.bn2001 nodupkey;
by bus_reg_nbr ref_yr_cd;
QUIT;
PROC SQL;
CREATE TABLE WORK.bn2000 as
SELECT t2_fd.bus_reg_nbr,
t2_fd.ref_yr_cd,
t2_fd.fpe_dt,
t2_fd.fps_dt
FROM tms.t2_financial_declaration t2_fd, tms.t2_income_stmt t2_is
WHERE t2_fd.ref_yr_cd = '2001' AND
T2_FD.REF_YR_CD = t2_is.REF_YR_CD AND
T2_FD.BUS_REG_NBR = t2_is.BUS_REG_NBR AND
T2_FD.BN_ACCT_SQNBR = t2_is.BN_ACCT_SQNBR AND
T2_FD.FPE_DT = t2_is.FPE_DT AND
T2_FD.FPS_DT = t2_is.FPS_DT AND
(t2_fd.fpe_dt - t2_fd.fps_dt) >= 30 AND
(t2_fd.dnr_find_mdul_nbr = '0' or
t2_fd.dnr_find_mdul_nbr = '1' or
t2_fd.dnr_find_mdul_nbr is null) AND
t2_fd.bus_reg_nbr not in
(SELECT bus_reg_nbr FROM work.bn2001 )
;
QUIT;
PROC SORT data = work.bn2000 ;
by descending fpe_dt ;
QUIT;
PROC SORT data= work.bn2000 nodupkey;
by bus_reg_nbr ref_yr_cd;
QUIT;