Data steps which I mentioned in the intial post will create a variable(s) like ENTITY_ID, REPORTING... in case if it is not available in source dataset. However your code has ended with error as below. I forgot to mention this point in my post. How to tweak your code now to produce the desired result?
26 data test;
27 input REPORTING $;
28 datalines;
NOTE: The data set WORK.TEST has 1 observations and 1 variables.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.01 seconds
30 ;
31 run;
32
33 proc sql;
34 create table dis_entity_id as
35 select distinct ENTITY_ID format=$ENTITY.,
36 REPORTING format=$50.
37 from test
38 order by ENTITY_ID, REPORTING;
ERROR: The following columns were not found in the contributing tables: ENTITY_ID.
NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.
39 quit;
... View more