Here is my log when I run it %macro r (x,n);&x. As &x.&n.%mend; Pro sql; Create table want as select A.site,a.date,a.%r (site,1),a.%r (mintime,1),a.%r (maxtime,1),a.%r (durtime,1), symbolgen: macro variable X resolves to site1 symbolgen: macro variable X resolves to site1 symbolgen: macro variable N resolves to 1 symbolgen: macro variable X resolves to maxtime1 symbolgen: macro variable X resolves to maxtime1 symbolgen: macro variable N resolves to 1 symbolgen: macro variable X resolves to mintime1 symbolgen: macro variable X resolves to mintime1 symbolgen: macro variable N resolves to 1 symbolgen: macro variable X resolves to durtime1 symbolgen: macro variable X resolves to durtime1 symbolgen: macro variable N resolves to 1 B.site,b.date,b.%r (site,2),b.%r (mintime,2), b.%r (maxtime,2),b.%r (durtime,2 symbolgen: macro variable X resolves to site2 symbolgen: macro variable X resolves to site2 symbolgen: macro variable N resolves to 2 symbolgen: macro variable X resolves to maxtime2 symbolgen: macro variable X resolves to maxtime2 symbolgen: macro variable N resolves to 2 symbolgen: macro variable X resolves to mintime2 symbolgen: macro variable X resolves to mintime2 symbolgen: macro variable N resolves to 2 symbolgen: macro variable X resolves to durtime2 symbolgen: macro variable X resolves to durtime3 symbolgen: macro variable N resolves to 2 From want6 as a inner join want6 as b on a.site =b.site And (a.maxtime1 GT b.mintime2 And A.maxtime1 LT b.maxtime2 ) Or (a.maxtime1 EQ B.maxtime2 and Input (substr (a.site11,3,4),4.) LT Input (substr (b.site11,3,4),4.) Quit; The execution of this query involves performing one or more Cartesian product joins that can not be optimized. the table want5 created with 3952 rows 10 columns
... View more