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

hi all 

 

I am unable to figure out the erorr in this code. Any help is appreciated.

 

Thank You

NOTE: Remote submit to MYNODE complete.
43   rsubmit ;
NOTE: Remote submit to MYNODE commencing.
303  *union t table from medicare and medicad together ;
304  proc sql;
305
306      *commercial;
307
308      create table data._03_t_table as
309          select distinct a.*,b.dtstart,b.dtend
310          from data._01_claims as a
311          inner join original.ccaet141 as b
312          on a.enrolid =b.enrolid
313      union
314          select distinct c.*,d.dtstart,d.dtend
315          from data._01_claims as c
316          inner join original.ccaet151 as d
317          on c.enrolid =d.enrolid
318          order by c.enrolid,c.svcdate,c.prod_grp
319      ;
ERROR: Unresolved reference to table/correlation name c.
ERROR: Unresolved reference to table/correlation name c.
ERROR: Unresolved reference to table/correlation name c.
NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.
320  quit ;
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds

NOTE: Remote submit to MYNODE complete.
1 ACCEPTED SOLUTION

Accepted Solutions
SASKiwi
PROC Star

Try removing the C from your ORDER BY

 order by enrolid, svcdate, prod_grp

View solution in original post

1 REPLY 1
SASKiwi
PROC Star

Try removing the C from your ORDER BY

 order by enrolid, svcdate, prod_grp

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!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 1 reply
  • 1023 views
  • 4 likes
  • 2 in conversation