<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to Do Common Table Expressions in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-Do-Common-Table-Expressions/m-p/833029#M329302</link>
    <description>&lt;P&gt;I moved your question into a new thread, and gave it a proper subject.&lt;/P&gt;</description>
    <pubDate>Tue, 13 Sep 2022 01:04:33 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2022-09-13T01:04:33Z</dc:date>
    <item>
      <title>How to Do Common Table Expressions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Do-Common-Table-Expressions/m-p/832968#M329301</link>
      <description>&lt;P&gt;proc fedsql now uses SQL:1999 standards and with that I was hoping to see CTE added.&amp;nbsp; It is not clear to me if Common Table Expression (CTE) is supported, but I am unable to execute CTE outside of any database.&amp;nbsp; CTE will let me break down my query into bite size pieces and reuse those pieces.&amp;nbsp; Expected syntax below for clarity.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does SAS support CTE, will it be coming soon, or have I missed it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc fedsql;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; create table want as&lt;/P&gt;
&lt;P&gt;&amp;nbsp; (with tmp as (select * from somewhere)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; ,tmp2 as (select * from somewhere_else)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;select a.id, b.var&lt;/P&gt;
&lt;P&gt;&amp;nbsp;from tmp a&lt;/P&gt;
&lt;P&gt;&amp;nbsp;left join tmp2 b&lt;/P&gt;
&lt;P&gt;on a.id=b.id&lt;/P&gt;
&lt;P&gt;);&lt;/P&gt;
&lt;P&gt;quit;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2022 01:03:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Do-Common-Table-Expressions/m-p/832968#M329301</guid>
      <dc:creator>DebG</dc:creator>
      <dc:date>2022-09-13T01:03:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to Do Common Table Expressions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Do-Common-Table-Expressions/m-p/833029#M329302</link>
      <description>&lt;P&gt;I moved your question into a new thread, and gave it a proper subject.&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2022 01:04:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Do-Common-Table-Expressions/m-p/833029#M329302</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-09-13T01:04:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to Do Common Table Expressions in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-Do-Common-Table-Expressions/m-p/833847#M329669</link>
      <description>&lt;P&gt;Appreciated Kirk.&amp;nbsp; CTE can be completed in passthrough in all databases which are SQL:1999 compliant.&amp;nbsp; SAS is the the only exception I have found.&amp;nbsp; I'm specifically interested in completed CTE in SAS datasets.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 13:30:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-Do-Common-Table-Expressions/m-p/833847#M329669</guid>
      <dc:creator>DebG</dc:creator>
      <dc:date>2022-09-16T13:30:28Z</dc:date>
    </item>
  </channel>
</rss>

