<?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: The execution of this query involves performing one or more Cartesian product joins that can not in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/The-execution-of-this-query-involves-performing-one-or-more/m-p/445447#M28814</link>
    <description>&lt;P&gt;Good Morning Kurt,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks a lot for your advice.&amp;nbsp; After many test, I have which join is causing this note.&amp;nbsp; It is the last join because there is no real key to make the join.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyway, I will have to rewrite this program completely because there are too many notes generated and I felt that this code is not as clear as I would like to.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;from commun.quotes_uniques_eis a&lt;BR /&gt;left join work.customer_email_info b&lt;BR /&gt;on a.customer_number = b.customernumber&lt;BR /&gt;left join (select * from commun.envoi_courriel_dates1 where today=&amp;amp;today.) c on c.today=&amp;amp;today&lt;/P&gt;</description>
    <pubDate>Wed, 14 Mar 2018 12:11:24 GMT</pubDate>
    <dc:creator>alepage</dc:creator>
    <dc:date>2018-03-14T12:11:24Z</dc:date>
    <item>
      <title>The execution of this query involves performing one or more Cartesian product joins that can not be</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/The-execution-of-this-query-involves-performing-one-or-more/m-p/443275#M28625</link>
      <description>&lt;P&gt;Good morning,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am debugging an existing code and after the execution of the code below, I receive this note:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The execution of this query involves performing one or more Cartesian product joins that cannot be optimized.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As I am not familiar at all with this note, I would like to know if there is something I could do to improve my code?&lt;/P&gt;&lt;P&gt;What are the implications of this note in term of result (created table)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc sql;&lt;BR /&gt;create table envoi_courriel_&amp;amp;yyyymm_e._&amp;amp;type_e._a as&lt;BR /&gt;select a.customer_number,&lt;BR /&gt;max(case when a.lob = "AUTO" then 1 else 0 end) as flg_quote_auto,&lt;BR /&gt;max(case when a.lob = "HOME" then 1 else 0 end) as flg_quote_hab,&lt;BR /&gt;max(case when a.flg_vip = 1 then 1 else 0 end) as flg_vip,&lt;BR /&gt;max(a.flg_lo) as flg_locataire,&lt;BR /&gt;max(a.principal_operation_date) as date_last_quote format YYMMDD10.&lt;/P&gt;&lt;P&gt;from commun.quotes_uniques_eis a&lt;BR /&gt;left join work.customer_email_info b&lt;BR /&gt;on a.customer_number = b.customernumber&lt;BR /&gt;left join commun.envoi_courriel_dates (where=( today=&amp;amp;today.)) c&lt;BR /&gt;on c.today=&amp;amp;today;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Mar 2018 13:04:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/The-execution-of-this-query-involves-performing-one-or-more/m-p/443275#M28625</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2018-03-07T13:04:04Z</dc:date>
    </item>
    <item>
      <title>Re: The execution of this query involves performing one or more Cartesian product joins that can not</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/The-execution-of-this-query-involves-performing-one-or-more/m-p/443282#M28627</link>
      <description>&lt;P&gt;There are a lot of posts and guidance out there on this topic:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/forums/searchpage/tab/message?advanced=false&amp;amp;allow_punctuation=false&amp;amp;q=Cartesian+product+join" target="_blank"&gt;https://communities.sas.com/t5/forums/searchpage/tab/message?advanced=false&amp;amp;allow_punctuation=false&amp;amp;q=Cartesian+product+join&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.orafaq.com/wiki/Cartesian_join" target="_blank"&gt;http://www.orafaq.com/wiki/Cartesian_join&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Mar 2018 13:13:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/The-execution-of-this-query-involves-performing-one-or-more/m-p/443282#M28627</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-03-07T13:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: The execution of this query involves performing one or more Cartesian product joins that can not</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/The-execution-of-this-query-involves-performing-one-or-more/m-p/443287#M28629</link>
      <description>&lt;P&gt;You are using SQL summary functions without a group by, so SAS has to create the values for the whole result of the join first and then re-read and assign for every customer_number.&lt;/P&gt;
&lt;P&gt;Could it be that&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;group by a.customer_number&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;is missing from the code?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since you do not use any variables from relations b and c, and a left join will always keep all observations from a, I don't see why the joins are there anyway.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Mar 2018 13:29:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/The-execution-of-this-query-involves-performing-one-or-more/m-p/443287#M28629</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-03-07T13:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: The execution of this query involves performing one or more Cartesian product joins that can not</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/The-execution-of-this-query-involves-performing-one-or-more/m-p/445447#M28814</link>
      <description>&lt;P&gt;Good Morning Kurt,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks a lot for your advice.&amp;nbsp; After many test, I have which join is causing this note.&amp;nbsp; It is the last join because there is no real key to make the join.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyway, I will have to rewrite this program completely because there are too many notes generated and I felt that this code is not as clear as I would like to.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;from commun.quotes_uniques_eis a&lt;BR /&gt;left join work.customer_email_info b&lt;BR /&gt;on a.customer_number = b.customernumber&lt;BR /&gt;left join (select * from commun.envoi_courriel_dates1 where today=&amp;amp;today.) c on c.today=&amp;amp;today&lt;/P&gt;</description>
      <pubDate>Wed, 14 Mar 2018 12:11:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/The-execution-of-this-query-involves-performing-one-or-more/m-p/445447#M28814</guid>
      <dc:creator>alepage</dc:creator>
      <dc:date>2018-03-14T12:11:24Z</dc:date>
    </item>
    <item>
      <title>Re: The execution of this query involves performing one or more Cartesian product joins that can not</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/The-execution-of-this-query-involves-performing-one-or-more/m-p/445450#M28816</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/76331"&gt;@alepage&lt;/a&gt; wrote:&lt;BR /&gt;&amp;nbsp;
&lt;P&gt;Anyway, I will have to rewrite this program completely because there are too many notes generated and I felt that this code is not as clear as I would like to.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Kudos to this.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Mar 2018 12:28:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/The-execution-of-this-query-involves-performing-one-or-more/m-p/445450#M28816</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-03-14T12:28:50Z</dc:date>
    </item>
  </channel>
</rss>

