<?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: query understanding in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/query-understanding/m-p/639270#M190134</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/292396"&gt;@David_Billa&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In my understanding, you have two datasets:&lt;/P&gt;
&lt;P&gt;-&amp;nbsp;W5XZP9G in the WORK library, which is identified as "W5XZP9G" (cf. alias keyword AS in the FROM clause)&lt;/P&gt;
&lt;P&gt;- CRE in the&amp;nbsp;IFEXT, which is identified as "CRE"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The query creates all Cartesian products resulting from the combination of these datasets as the type of join (e.g. inner, left, right or full) is not specified.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So the query results in the display of all possible combinations of the multiplication of the variable COL1 in the dataset&amp;nbsp;W5XZP9G and the variable Factor in the dataset CRE.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data work.have1;
	input col1;
	datalines;
2
5
;
run;
data work.have2;
	input Factor;
	datalines;
2
5
;
run;

proc sql;
	select W5XZP9G.COL1,
		   CRE.Factor,
		   W5XZP9G.COL1  *  CRE.Factor
	from work.have1 as W5XZP9G, work.have2 as CRE;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Output:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture d’écran 2020-04-12 à 09.21.43.png" style="width: 182px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/38233i274C9FE8103C5FC7/image-size/small?v=v2&amp;amp;px=200" role="button" title="Capture d’écran 2020-04-12 à 09.21.43.png" alt="Capture d’écran 2020-04-12 à 09.21.43.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;</description>
    <pubDate>Sun, 12 Apr 2020 07:23:51 GMT</pubDate>
    <dc:creator>ed_sas_member</dc:creator>
    <dc:date>2020-04-12T07:23:51Z</dc:date>
    <item>
      <title>query understanding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/query-understanding/m-p/639263#M190130</link>
      <description>&lt;P&gt;Appericiate if someone of you help me understand this query.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;proc sql;
select W5XZP9G.COL1  *  CRE.Factor from work.W5XZP9G as W5XZP9G,IFEXT.CRE as CRE;
quit;&lt;/PRE&gt;</description>
      <pubDate>Sun, 12 Apr 2020 06:26:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/query-understanding/m-p/639263#M190130</guid>
      <dc:creator>David_Billa</dc:creator>
      <dc:date>2020-04-12T06:26:31Z</dc:date>
    </item>
    <item>
      <title>Re: query understanding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/query-understanding/m-p/639270#M190134</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/292396"&gt;@David_Billa&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In my understanding, you have two datasets:&lt;/P&gt;
&lt;P&gt;-&amp;nbsp;W5XZP9G in the WORK library, which is identified as "W5XZP9G" (cf. alias keyword AS in the FROM clause)&lt;/P&gt;
&lt;P&gt;- CRE in the&amp;nbsp;IFEXT, which is identified as "CRE"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The query creates all Cartesian products resulting from the combination of these datasets as the type of join (e.g. inner, left, right or full) is not specified.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So the query results in the display of all possible combinations of the multiplication of the variable COL1 in the dataset&amp;nbsp;W5XZP9G and the variable Factor in the dataset CRE.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data work.have1;
	input col1;
	datalines;
2
5
;
run;
data work.have2;
	input Factor;
	datalines;
2
5
;
run;

proc sql;
	select W5XZP9G.COL1,
		   CRE.Factor,
		   W5XZP9G.COL1  *  CRE.Factor
	from work.have1 as W5XZP9G, work.have2 as CRE;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Output:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture d’écran 2020-04-12 à 09.21.43.png" style="width: 182px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/38233i274C9FE8103C5FC7/image-size/small?v=v2&amp;amp;px=200" role="button" title="Capture d’écran 2020-04-12 à 09.21.43.png" alt="Capture d’écran 2020-04-12 à 09.21.43.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;</description>
      <pubDate>Sun, 12 Apr 2020 07:23:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/query-understanding/m-p/639270#M190134</guid>
      <dc:creator>ed_sas_member</dc:creator>
      <dc:date>2020-04-12T07:23:51Z</dc:date>
    </item>
    <item>
      <title>Re: query understanding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/query-understanding/m-p/639283#M190141</link>
      <description>&lt;P&gt;Just format the code properly and suddenly it's legible.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
  select W5XZP9G.COL1 * CRE.Factor 
  from WORK.W5XZP9G as W5XZP9G
      ,IFEXT.CRE    as CRE;
quit;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;There is not excuse ever for not formatting code to be as pretty as possible.&lt;/P&gt;
&lt;P&gt;Align things, add spaces. That's all.&lt;/P&gt;
&lt;P&gt;Pretty means legible means easy to avoid and to identify bugs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 12 Apr 2020 10:25:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/query-understanding/m-p/639283#M190141</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-04-12T10:25:19Z</dc:date>
    </item>
  </channel>
</rss>

