proc fedsql now uses SQL:1999 standards and with that I was hoping to see CTE added. It is not clear to me if Common Table Expression (CTE) is supported, but I am unable to execute CTE outside of any database. CTE will let me break down my query into bite size pieces and reuse those pieces. Expected syntax below for clarity.
Does SAS support CTE, will it be coming soon, or have I missed it?
proc fedsql;
create table want as
(with tmp as (select * from somewhere)
,tmp2 as (select * from somewhere_else)
select a.id, b.var
from tmp a
left join tmp2 b
on a.id=b.id
);
quit;
... View more