<?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: sql or fedsql join to mimic join with exists operator in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/sql-or-fedsql-join-to-mimic-join-with-exists-operator/m-p/851318#M336470</link>
    <description>&lt;P&gt;Thank you, I had tried it already.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It returns the error:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE id="pre_sasLog_642" class="sasLog"&gt;ERROR: Unsupported operation in FedSQL query: IN/ANY/ALL subquery.&lt;/PRE&gt;</description>
    <pubDate>Wed, 28 Dec 2022 09:52:14 GMT</pubDate>
    <dc:creator>acordes</dc:creator>
    <dc:date>2022-12-28T09:52:14Z</dc:date>
    <item>
      <title>sql or fedsql join to mimic join with exists operator</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sql-or-fedsql-join-to-mimic-join-with-exists-operator/m-p/851228#M336423</link>
      <description>&lt;P&gt;I want to resolve in one join what actually requires a secondary data step.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In my understanding I cannot use the exists operator as fedsql on caslibs does not allow for this option.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The following code does what it should but I want the (fedsql) to return only these rows form the left table that do not exist in the second table.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc cas;
source MPG_toyota;
    create table public.sum22{options replace=true as 
      select a.*, case when b.codopera='' then 0 else 1 end as flagy 
               from PUBLIC.JS_MTOS_V2AA a left join MKT.OUTYS b 
      on b.codopera=a.codopera    ;
endsource;
fedSQL.execDirect / query=MPG_toyota;
quit;

data public.sum22;
set public.sum22;
where flagy=0;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Dec 2022 12:21:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sql-or-fedsql-join-to-mimic-join-with-exists-operator/m-p/851228#M336423</guid>
      <dc:creator>acordes</dc:creator>
      <dc:date>2022-12-27T12:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: sql or fedsql join to mimic join with exists operator</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sql-or-fedsql-join-to-mimic-join-with-exists-operator/m-p/851261#M336439</link>
      <description>&lt;P&gt;The documentation seems to clearly say that FEDSQL supports EXISTS.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/v_034/fedsqlref/n0j8gspb9heiqgn1rneohxqxx3s3.htm" target="_blank"&gt;https://documentation.sas.com/doc/en/pgmsascdc/v_034/fedsqlref/n0j8gspb9heiqgn1rneohxqxx3s3.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is there some place where it is documented that you cannot use it from PROC CAS?&lt;/P&gt;</description>
      <pubDate>Tue, 27 Dec 2022 18:27:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sql-or-fedsql-join-to-mimic-join-with-exists-operator/m-p/851261#M336439</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-12-27T18:27:49Z</dc:date>
    </item>
    <item>
      <title>Re: sql or fedsql join to mimic join with exists operator</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sql-or-fedsql-join-to-mimic-join-with-exists-operator/m-p/851300#M336459</link>
      <description>&lt;P&gt;I am not a fedSQL user but for such a simple condition, you could use&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;select * from PUBLIC.JS_MTOS_V2AA
where codopera not in (select codopera from MKT.OUTYS)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;No?&lt;/P&gt;</description>
      <pubDate>Wed, 28 Dec 2022 04:43:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sql-or-fedsql-join-to-mimic-join-with-exists-operator/m-p/851300#M336459</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2022-12-28T04:43:38Z</dc:date>
    </item>
    <item>
      <title>Re: sql or fedsql join to mimic join with exists operator</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sql-or-fedsql-join-to-mimic-join-with-exists-operator/m-p/851318#M336470</link>
      <description>&lt;P&gt;Thank you, I had tried it already.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It returns the error:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE id="pre_sasLog_642" class="sasLog"&gt;ERROR: Unsupported operation in FedSQL query: IN/ANY/ALL subquery.&lt;/PRE&gt;</description>
      <pubDate>Wed, 28 Dec 2022 09:52:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sql-or-fedsql-join-to-mimic-join-with-exists-operator/m-p/851318#M336470</guid>
      <dc:creator>acordes</dc:creator>
      <dc:date>2022-12-28T09:52:14Z</dc:date>
    </item>
    <item>
      <title>Re: sql or fedsql join to mimic join with exists operator</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sql-or-fedsql-join-to-mimic-join-with-exists-operator/m-p/851319#M336471</link>
      <description>&lt;P&gt;Thank you, I think it's not permitted.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/vdmmlcdc/8.11/proc/p03fos5ei9l0opn1vm82gu383g10.htm" target="_self"&gt;https://documentation.sas.com/doc/en/vdmmlcdc/8.11/proc/p03fos5ei9l0opn1vm82gu383g10.htm&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Dec 2022 10:03:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sql-or-fedsql-join-to-mimic-join-with-exists-operator/m-p/851319#M336471</guid>
      <dc:creator>acordes</dc:creator>
      <dc:date>2022-12-28T10:03:54Z</dc:date>
    </item>
  </channel>
</rss>

