BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Shrutibhatnagar
Obsidian | Level 7

proc sql;
create table work.test as
select product_ID, max(AON) as MaximumAON from class1.smb
group by 1;
quit;

proc sql ;
select smb.PRODUCT_ID
,smb.Year
,smb.AON
,smb.CELL_CALL_CNT_M1
,smb.CELL_CALL_CNT_M2
,smb.CELL_CALL_CNT_M3
,smb.CELL_CALL_CNT_M4
,smb.CELL_CALL_CNT_M5
,smb.CELL_CALL_CNT_M6
,smb.CELL_CALL_SEC_M1
,smb.CELL_CALL_SEC_M2
,smb.CELL_CALL_SEC_M3
,smb.CELL_CALL_SEC_M4
,smb.CELL_CALL_SEC_M5
,smb.CELL_CALL_SEC_M6
,smb.CELL_CALL_avg_dur_M1
,smb.CELL_CALL_avg_dur_M2
,smb.CELL_CALL_avg_dur_M3
,smb.CELL_CALL_avg_dur_M4
,smb.CELL_CALL_avg_dur_M5
,smb.CELL_CALL_avg_dur_M6
,smb.CELL_USAGE_CHARGE_AMT_M1
,smb.CELL_USAGE_CHARGE_AMT_M2
,smb.CELL_USAGE_CHARGE_AMT_M3
,smb.CELL_USAGE_CHARGE_AMT_M4
,smb.CELL_USAGE_CHARGE_AMT_M5
,smb.CELL_USAGE_CHARGE_AMT_M6
,smb.DATA_CALL_CNT_M1
,smb.DATA_CALL_CNT_M2
,smb.DATA_CALL_CNT_M3
,smb.DATA_CALL_CNT_M4
,smb.DATA_CALL_CNT_M5
,smb.DATA_CALL_CNT_M6
,smb.DATA_CALL_SEC_M1
,smb.DATA_CALL_SEC_M2
,smb.DATA_CALL_SEC_M3
,smb.DATA_CALL_SEC_M4
,smb.DATA_CALL_SEC_M5
,smb.DATA_CALL_SEC_M6
,smb.DATA_CALL_avg_dur_M1
,smb.DATA_CALL_avg_dur_M2
,smb.DATA_CALL_avg_dur_M3
,smb.DATA_CALL_avg_dur_M4
,smb.DATA_CALL_avg_dur_M5
,smb.DATA_CALL_avg_dur_M6
,smb.DATA_USAGE_CHARGE_AMT_M1
,smb.DATA_USAGE_CHARGE_AMT_M2
,smb.DATA_USAGE_CHARGE_AMT_M3
,smb.DATA_USAGE_CHARGE_AMT_M4
,smb.DATA_USAGE_CHARGE_AMT_M5
,smb.DATA_USAGE_CHARGE_AMT_M6
,smb.INT_CALL_CNT_M1
,smb.INT_CALL_CNT_M2
,smb.INT_CALL_CNT_M3
,smb.INT_CALL_CNT_M4
,smb.INT_CALL_CNT_M5
,smb.INT_CALL_CNT_M6
,smb.INT_CALL_SEC_M1
,smb.INT_CALL_SEC_M2
,smb.INT_CALL_SEC_M3
,smb.INT_CALL_SEC_M4
,smb.INT_CALL_SEC_M5
,smb.INT_CALL_SEC_M6
,smb.INT_CALL_avg_dur_M1
,smb.INT_CALL_avg_dur_M2
,smb.INT_CALL_avg_dur_M3
,smb.INT_CALL_avg_dur_M4
,smb.INT_CALL_avg_dur_M5
,smb.INT_CALL_avg_dur_M6
,smb.INT_USAGE_CHARGE_AMT_M1
,smb.INT_USAGE_CHARGE_AMT_M2
,smb.INT_USAGE_CHARGE_AMT_M3
,smb.INT_USAGE_CHARGE_AMT_M4
,smb.INT_USAGE_CHARGE_AMT_M5
,smb.INT_USAGE_CHARGE_AMT_M6
,smb.LOCAL_CALL_CNT_M1
,smb.LOCAL_CALL_CNT_M2
,smb.LOCAL_CALL_CNT_M3
,smb.LOCAL_CALL_CNT_M4
,smb.LOCAL_CALL_CNT_M5
,smb.LOCAL_CALL_CNT_M6
,smb.LOCAL_CALL_SEC_M1
,smb.LOCAL_CALL_SEC_M2
,smb.LOCAL_CALL_SEC_M3
,smb.LOCAL_CALL_SEC_M4
,smb.LOCAL_CALL_SEC_M5
,smb.LOCAL_CALL_SEC_M6
,smb.LOCAL_CAL_avg_dur_M1
,smb.LOCAL_CAL_avg_dur_M2
,smb.LOCAL_CAL_avg_dur_M3
,smb.LOCAL_CAL_avg_dur_M4
,smb.LOCAL_CAL_avg_dur_M5
,smb.LOCAL_CAL_avg_dur_M6
,smb.LOCAL_USAGE_CHARGE_AMT_M1
,smb.LOCAL_USAGE_CHARGE_AMT_M2
,smb.LOCAL_USAGE_CHARGE_AMT_M3
,smb.LOCAL_USAGE_CHARGE_AMT_M4
,smb.LOCAL_USAGE_CHARGE_AMT_M5
,smb.LOCAL_USAGE_CHARGE_AMT_M6
,smb.NAT_CALL_CNT_M1
,smb.NAT_CALL_CNT_M2
,smb.NAT_CALL_CNT_M3
,smb.NAT_CALL_CNT_M4
,smb.NAT_CALL_CNT_M5
,smb.NAT_CALL_CNT_M6
,smb.NAT_CALL_SEC_M1
,smb.NAT_CALL_SEC_M2
,smb.NAT_CALL_SEC_M3
,smb.NAT_CALL_SEC_M4
,smb.NAT_CALL_SEC_M5
,smb.NAT_CALL_SEC_M6
,smb.NAT_CALL_avg_dur_M1
,smb.NAT_CALL_avg_dur_M2
,smb.NAT_CALL_avg_dur_M3
,smb.NAT_CALL_avg_dur_M4
,smb.NAT_CALL_avg_dur_M5
,smb.NAT_CALL_avg_dur_M6
,smb.NAT_USAGE_CHARGE_AMT_M1
,smb.NAT_USAGE_CHARGE_AMT_M2
,smb.NAT_USAGE_CHARGE_AMT_M3
,smb.NAT_USAGE_CHARGE_AMT_M4
,smb.NAT_USAGE_CHARGE_AMT_M5
,smb.NAT_USAGE_CHARGE_AMT_M6
,smb.ONE_TIME_CHARGE_AMT_M1
,smb.ONE_TIME_CHARGE_AMT_M2
,smb.ONE_TIME_CHARGE_AMT_M3
,smb.ONE_TIME_CHARGE_AMT_M4
,smb.ONE_TIME_CHARGE_AMT_M5
,smb.ONE_TIME_CHARGE_AMT_M6
,smb.OTHER_CALL_CNT_M1
,smb.OTHER_CALL_CNT_M2
,smb.OTHER_CALL_CNT_M3
,smb.OTHER_CALL_CNT_M4
,smb.OTHER_CALL_CNT_M5
,smb.OTHER_CALL_CNT_M6
,smb.OTHER_CALL_SEC_M1
,smb.OTHER_CALL_SEC_M2
,smb.OTHER_CALL_SEC_M3
,smb.OTHER_CALL_SEC_M4
,smb.OTHER_CALL_SEC_M5
,smb.OTHER_CALL_SEC_M6
,smb.OTHER_CAL_avg_dur_M1
,smb.OTHER_CAL_avg_dur_M2
,smb.OTHER_CAL_avg_dur_M3
,smb.OTHER_CAL_avg_dur_M4
,smb.OTHER_CAL_avg_dur_M5
,smb.OTHER_CAL_avg_dur_M6
,smb.OTHER_USAGE_CHARGE_AMT_M1
,smb.OTHER_USAGE_CHARGE_AMT_M2
,smb.OTHER_USAGE_CHARGE_AMT_M3
,smb.OTHER_USAGE_CHARGE_AMT_M4
,smb.OTHER_USAGE_CHARGE_AMT_M5
,smb.OTHER_USAGE_CHARGE_AMT_M6
,smb.OVR_CALL_AVG_DURATION_M1
,smb.OVR_CALL_AVG_DURATION_M2
,smb.OVR_CALL_AVG_DURATION_M3
,smb.OVR_CALL_AVG_DURATION_M4
,smb.OVR_CALL_AVG_DURATION_M5
,smb.OVR_CALL_AVG_DURATION_M6
,smb.RECURRING_CHARGE_AMT_M1
,smb.RECURRING_CHARGE_AMT_M2
,smb.RECURRING_CHARGE_AMT_M3
,smb.RECURRING_CHARGE_AMT_M4
,smb.RECURRING_CHARGE_AMT_M5
,smb.RECURRING_CHARGE_AMT_M6
,smb.SPEND_AMT_M1
,smb.SPEND_AMT_M2
,smb.SPEND_AMT_M3
,smb.SPEND_AMT_M4
,smb.SPEND_AMT_M5
,smb.SPEND_AMT_M6
,smb.TOT_CALL_CNT_M1
,smb.TOT_CALL_CNT_M2
,smb.TOT_CALL_CNT_M3
,smb.TOT_CALL_CNT_M4
,smb.TOT_CALL_CNT_M5
,smb.TOT_CALL_CNT_M6
,smb.TOT_CALL_SEC_M1
,smb.TOT_CALL_SEC_M2
,smb.TOT_CALL_SEC_M3
,smb.TOT_CALL_SEC_M4
,smb.TOT_CALL_SEC_M5
,smb.TOT_CALL_SEC_M6
,smb.TOT_CHARGE_AMT_M1
,smb.TOT_CHARGE_AMT_M2
,smb.TOT_CHARGE_AMT_M3
,smb.TOT_CHARGE_AMT_M4
,smb.TOT_CHARGE_AMT_M5
,smb.TOT_CHARGE_AMT_M6
,smb.USAGE_CHARGE_AMT_M1
,smb.USAGE_CHARGE_AMT_M2
,smb.USAGE_CHARGE_AMT_M3
,smb.USAGE_CHARGE_AMT_M4
,smb.USAGE_CHARGE_AMT_M5
,smb.USAGE_CHARGE_AMT_M6
,smb.TCL_DLM
,smb.TCL_DL2M
,smb.TCL_DL3M
,smb.TCH_DLM
,smb.TCH_DL2M
,smb.TCH_DL3M
,smb.LCL_DLM
,smb.LCL_DL2M
,smb.LCL_DL3M
,smb.NCL_DLM
,smb.NCL_DL2M
,smb.NCL_DL3M
,smb.CELL_CALL_SEC_Avg6
,smb.CELL_CALL_avg_dur_Avg6
,smb.CELL_USAGE_CHARGE_AMT_Avg6
,smb.DATA_CALL_CNT_Avg6
,smb.DATA_CALL_SEC_Avg6
,smb.DATA_CALL_avg_dur_Avg6
,smb.DATA_USAGE_CHARGE_AMT_Avg6
,smb.INT_CALL_CNT_Avg6
,smb.INT_CALL_SEC_Avg6
,smb.INT_CALL_avg_dur_Avg6
,smb.INT_USAGE_CHARGE_AMT_Avg6
,smb.LOCAL_CALL_CNT_Avg6
,smb.LOCAL_CALL_SEC_Avg6
,smb.LOCAL_CAL_avg_dur_Avg6
,smb.LOCAL_USAGE_CHARGE_AMT_Avg6
,smb.NAT_CALL_CNT_Avg6
,smb.NAT_CALL_SEC_Avg6
,smb.NAT_CALL_avg_dur_Avg6
,smb.NAT_USAGE_CHARGE_AMT_Avg6
,smb.ONE_TIME_CHARGE_AMT_Avg6
,smb.OTHER_CALL_CNT_Avg6
,smb.OTHER_CALL_SEC_Avg6
,smb.OTHER_CAL_avg_dur_Avg6
,smb.OTHER_USAGE_CHARGE_AMT_Avg6
,smb.OVR_CALL_AVG_DURATION_Avg6
,smb.RECURRING_CHARGE_AMT_Avg6
,smb.SPEND_AMT_Avg6
,smb.TOT_CALL_CNT_Avg6
,smb.TOT_CALL_SEC_Avg6
,smb.TOT_CHARGE_AMT_Avg6
,smb.USAGE_CHARGE_AMT_Avg6
,smb.CELL_CALL_SEC_Avg3
,smb.CELL_CALL_avg_dur_Avg3
,smb.CELL_USAGE_CHARGE_AMT_Avg3
,smb.DATA_CALL_CNT_Avg3
,smb.DATA_CALL_SEC_Avg3
,smb.DATA_CALL_avg_dur_Avg3
,smb.DATA_USAGE_CHARGE_AMT_Avg3
,smb.INT_CALL_CNT_Avg3
,smb.INT_CALL_SEC_Avg3
,smb.INT_CALL_avg_dur_Avg3
,smb.INT_USAGE_CHARGE_AMT_Avg3
,smb.LOCAL_CALL_CNT_Avg3
,smb.LOCAL_CALL_SEC_Avg3
,smb.LOCAL_CAL_avg_dur_Avg3
,smb.LOCAL_USAGE_CHARGE_AMT_Avg3
,smb.NAT_CALL_CNT_Avg3
,smb.NAT_CALL_SEC_Avg3
,smb.NAT_CALL_avg_dur_Avg3
,smb.NAT_USAGE_CHARGE_AMT_Avg3
,smb.ONE_TIME_CHARGE_AMT_Avg3
,smb.OTHER_CALL_CNT_Avg3
,smb.OTHER_CALL_SEC_Avg3
,smb.OTHER_CAL_avg_dur_Avg3
,smb.OTHER_USAGE_CHARGE_AMT_Avg3
,smb.OVR_CALL_AVG_DURATION_Avg3
,smb.RECURRING_CHARGE_AMT_Avg3
,smb.SPEND_AMT_Avg3
,smb.TOT_CALL_CNT_Avg3
,smb.TOT_CALL_SEC_Avg3
,smb.TOT_CHARGE_AMT_Avg3
,smb.USAGE_CHARGE_AMT_Avg3
,smb.CELL_CALL_CNT_DEC2_1
,smb.CELL_CALL_CNT_DEC3_2
,smb.CELL_CALL_CNT_DEC4_3
,smb.CELL_CALL_CNT_DEC5_4
,smb.CELL_CALL_CNT_DEC6_5
,smb.CELL_CALL_SEC_DEC2_1
,smb.CELL_CALL_SEC_DEC3_2
,smb.CELL_CALL_SEC_DEC4_3
,smb.CELL_CALL_SEC_DEC5_4
,smb.CELL_CALL_SEC_DEC6_5
,smb.CELL_CALL_avg_dur_DEC2_1
,smb.CELL_CALL_avg_dur_DEC3_2
,smb.CELL_CALL_avg_dur_DEC4_3
,smb.CELL_CALL_avg_dur_DEC5_4
,smb.CELL_CALL_avg_dur_DEC6_5
,smb.CELL_USAGE_CHARGE_AMT_DEC2_1
,smb.CELL_USAGE_CHARGE_AMT_DEC3_2
,smb.CELL_USAGE_CHARGE_AMT_DEC4_3
,smb.CELL_USAGE_CHARGE_AMT_DEC5_4
,smb.CELL_USAGE_CHARGE_AMT_DEC6_5
,smb.INT_CALL_CNT_DEC2_1
,smb.INT_CALL_CNT_DEC3_2
,smb.INT_CALL_CNT_DEC4_3
,smb.INT_CALL_CNT_DEC5_4
,smb.INT_CALL_CNT_DEC6_5
,smb.INT_CALL_SEC_DEC2_1
,smb.INT_CALL_SEC_DEC3_2
,smb.INT_CALL_SEC_DEC4_3
,smb.INT_CALL_SEC_DEC5_4
,smb.INT_CALL_SEC_DEC6_5
,smb.INT_CALL_avg_dur_DEC2_1
,smb.INT_CALL_avg_dur_DEC3_2
,smb.INT_CALL_avg_dur_DEC4_3
,smb.INT_CALL_avg_dur_DEC5_4
,smb.INT_CALL_avg_dur_DEC6_5
,smb.INT_USAGE_CHARGE_AMT_DEC2_1
,smb.INT_USAGE_CHARGE_AMT_DEC3_2
,smb.INT_USAGE_CHARGE_AMT_DEC4_3
,smb.INT_USAGE_CHARGE_AMT_DEC5_4
,smb.INT_USAGE_CHARGE_AMT_DEC6_5
,smb.LOCAL_CALL_CNT_DEC2_1
,smb.LOCAL_CALL_CNT_DEC3_2
,smb.LOCAL_CALL_CNT_DEC4_3
,smb.LOCAL_CALL_CNT_DEC5_4
,smb.LOCAL_CALL_CNT_DEC6_5
,smb.LOCAL_CALL_SEC_DEC2_1
,smb.LOCAL_CALL_SEC_DEC3_2
,smb.LOCAL_CALL_SEC_DEC4_3
,smb.LOCAL_CALL_SEC_DEC5_4
,smb.LOCAL_CALL_SEC_DEC6_5
,smb.LOCAL_CAL_avg_dur_DEC2_1
,smb.LOCAL_CAL_avg_dur_DEC3_2
,smb.LOCAL_CAL_avg_dur_DEC4_3
,smb.LOCAL_CAL_avg_dur_DEC5_4
,smb.LOCAL_CAL_avg_dur_DEC6_5
,smb.LOCAL_USAGE_CHARGE_AMT_DEC2_1
,smb.LOCAL_USAGE_CHARGE_AMT_DEC3_2
,smb.LOCAL_USAGE_CHARGE_AMT_DEC4_3
,smb.LOCAL_USAGE_CHARGE_AMT_DEC5_4
,smb.LOCAL_USAGE_CHARGE_AMT_DEC6_5
,smb.NAT_CALL_CNT_DEC2_1
,smb.NAT_CALL_CNT_DEC3_2
,smb.NAT_CALL_CNT_DEC4_3
,smb.NAT_CALL_CNT_DEC5_4
,smb.NAT_CALL_CNT_DEC6_5
,smb.NAT_CALL_SEC_DEC2_1
,smb.NAT_CALL_SEC_DEC3_2
,smb.NAT_CALL_SEC_DEC4_3
,smb.NAT_CALL_SEC_DEC5_4
,smb.NAT_CALL_SEC_DEC6_5
,smb.NAT_CALL_avg_dur_DEC2_1
,smb.NAT_CALL_avg_dur_DEC3_2
,smb.NAT_CALL_avg_dur_DEC4_3
,smb.NAT_CALL_avg_dur_DEC5_4
,smb.NAT_CALL_avg_dur_DEC6_5
,smb.NAT_USAGE_CHARGE_AMT_DEC2_1
,smb.NAT_USAGE_CHARGE_AMT_DEC3_2
,smb.NAT_USAGE_CHARGE_AMT_DEC4_3
,smb.NAT_USAGE_CHARGE_AMT_DEC5_4
,smb.NAT_USAGE_CHARGE_AMT_DEC6_5
,smb.SPEND_AMT_DEC2_1
,smb.SPEND_AMT_DEC3_2
,smb.SPEND_AMT_DEC4_3
,smb.SPEND_AMT_DEC5_4
,smb.SPEND_AMT_DEC6_5
,smb.TOT_CALL_CNT_DEC2_1
,smb.TOT_CALL_CNT_DEC3_2
,smb.TOT_CALL_CNT_DEC4_3
,smb.TOT_CALL_CNT_DEC5_4
,smb.TOT_CALL_CNT_DEC6_5
,smb.TOT_CALL_SEC_DEC2_1
,smb.TOT_CALL_SEC_DEC3_2
,smb.TOT_CALL_SEC_DEC4_3
,smb.TOT_CALL_SEC_DEC5_4
,smb.TOT_CALL_SEC_DEC6_5
,smb.TOT_CHARGE_AMT_DEC2_1
,smb.TOT_CHARGE_AMT_DEC3_2
,smb.TOT_CHARGE_AMT_DEC4_3
,smb.TOT_CHARGE_AMT_DEC5_4
,smb.TOT_CHARGE_AMT_DEC6_5
,smb.USAGE_CHARGE_AMT_DEC2_1
,smb.USAGE_CHARGE_AMT_DEC3_2
,smb.USAGE_CHARGE_AMT_DEC4_3
,smb.USAGE_CHARGE_AMT_DEC5_4
,smb.USAGE_CHARGE_AMT_DEC6_5
,smb.Avg_DEC_6M_CELL_CALL_CNT
,smb.Avg_DEC_6M_CELL_CALL_SEC
,smb.Avg_DEC_6M_CELL_CALL_avg_dur
,smb.Avg_DEC_6M_CELL_USAGE_CHARGE_AMT
,smb.Avg_DEC_6M_INT_CALL_CNT
,smb.Avg_DEC_6M_INT_CALL_SEC
,smb.Avg_DEC_6M_INT_CALL_avg_dur
,smb.Avg_DEC_6M_INT_USAGE_CHARGE_AMT
,smb.Avg_DEC_6M_LOCAL_CALL_CNT
,smb.Avg_DEC_6M_LOCAL_CALL_SEC
,smb.Avg_DEC_6M_LOCAL_CAL_avg_dur
,smb.Avg_DEC_6M_LOC_USAGE_CHRG_AMT
,smb.Avg_DEC_6M_NAT_CALL_CNT
,smb.Avg_DEC_6M_NAT_CALL_SEC
,smb.Avg_DEC_6M_NAT_CALL_avg_dur
,smb.Avg_DEC_6M_NAT_USAGE_CHARGE_AMT
,smb.Avg_DEC_6M_SPEND_AMT
,smb.Avg_DEC_6M_TOT_CALL_CNT
,smb.Avg_DEC_6M_TOT_CALL_SEC
,smb.Avg_DEC_6M_TOT_CHARGE_AMT
,smb.Avg_DEC_6M_USAGE_CHARGE_AMT
,smb.Avg_DEC_3M_CELL_CALL_CNT
,smb.Avg_DEC_3M_CELL_CALL_SEC
,smb.Avg_DEC_3M_CELL_CALL_avg_dur
,smb.Avg_DEC_3M_CELL_USAGE_CHARGE_AMT
,smb.Avg_DEC_3M_INT_CALL_CNT
,smb.Avg_DEC_3M_INT_CALL_SEC
,smb.Avg_DEC_3M_INT_CALL_avg_dur
,smb.Avg_DEC_3M_INT_USAGE_CHARGE_AMT
,smb.Avg_DEC_3M_LOCAL_CALL_CNT
,smb.Avg_DEC_3M_LOCAL_CALL_SEC
,smb.Avg_DEC_3M_LOCAL_CAL_avg_dur
,smb.Avg_DEC_3M_LOC_USAGE_CHRG_AMT
,smb.Avg_DEC_3M_NAT_CALL_CNT
,smb.Avg_DEC_3M_NAT_CALL_SEC
,smb.Avg_DEC_3M_NAT_CALL_avg_dur
,smb.Avg_DEC_3M_NAT_USAGE_CHARGE_AMT
,smb.Avg_DEC_3M_SPEND_AMT
,smb.Avg_DEC_3M_TOT_CALL_CNT
,smb.Avg_DEC_3M_TOT_CALL_SEC
,smb.Avg_DEC_3M_TOT_CHARGE_AMT
,smb.Avg_DEC_3M_USAGE_CHARGE_AMT from class1.smb

left join test
on smb.product_id=test.product_id;
quit;

 

error is given as follows:-

 

 

488 ,smb.Avg_DEC_3M_TOT_CHARGE_AMT
489 ,smb.Avg_DEC_3M_USAGE_CHARGE_AMT from class1.smb
490
491 left join work.test
492 on smb.product_id=test.product_id;
ERROR: File WORK.TEST.DATA does not exist.
NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.
493 quit;
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SQL used (Total process time):
real time 0.22 seconds
cpu time 0.21 seconds
 
494
1 ACCEPTED SOLUTION

Accepted Solutions
VDD
Ammonite | Level 13 VDD
Ammonite | Level 13

if you do a test run by dumping all the extra columns and just select 2 or 3 columns for your second SQL process you might be-able to debug it.

After you have the logic working add back into the code all the extra information

https://communities.sas.com/t5/SAS-Studio/please-see-the-error/m-p/543764

 

View solution in original post

8 REPLIES 8
Shrutibhatnagar
Obsidian | Level 7

i want to perform left join of smb file and the test file created in proc sql.

Astounding
PROC Star
Two possibilities: either the first PROC SQL contains an error that needs to be fixed, or the first PROC SQL didn't run as part of the same program that ran the second PROC SQL.
Shrutibhatnagar
Obsidian | Level 7

first proc sql is executing fine 

i need to know how do i refer the table created in first proc sql (test) in the second proc sql.

Astounding
PROC Star

Considering this result:

 

491 left join work.test
492 on smb.product_id=test.product_id;
ERROR: File WORK.TEST.DATA does not exist.
 
 
Try changing one line by removing "work.":
 
left join test
on smb.product_ict=test.product_id;
 
If that doesn't fix it, I'm out of ideas.
VDD
Ammonite | Level 13 VDD
Ammonite | Level 13

I really like the long descriptive names they assist those who don't know that dataset variables are

While those long names are getting in your way because the code is hard as he?? to read.  

why don't you use a simple data step to create a subset of the data information needed? 

do you have to use Proc SQL because it has to be done on a SQL server?

 

Shrutibhatnagar
Obsidian | Level 7

i am using these datasets as they are in my assignments 😞

Shrutibhatnagar
Obsidian | Level 7

i need to use proc sql ony in this 

VDD
Ammonite | Level 13 VDD
Ammonite | Level 13

if you do a test run by dumping all the extra columns and just select 2 or 3 columns for your second SQL process you might be-able to debug it.

After you have the logic working add back into the code all the extra information

https://communities.sas.com/t5/SAS-Studio/please-see-the-error/m-p/543764

 

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 8 replies
  • 1105 views
  • 0 likes
  • 3 in conversation