<?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 Enterprise Guide does not merge tables as intended in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-does-not-merge-tables-as-intended/m-p/1987#M665</link>
    <description>I am trying to join two tables. One is the main data table and the other (from which I need one field), is relatively small. I am joining using a Left Join on two fields in the main table and three fields in the secondary table. To do this properly in Proc SQL, I would manually code this as follows:-&lt;BR /&gt;
PROC SQL;&lt;BR /&gt;
 CREATE TABLE WORK.Query_for_CLGLEXT AS SELECT CLGLEXT.account_code,&lt;BR /&gt;
	 CLGLEXT.accounting_date FORMAT=DDMMYY10.,&lt;BR /&gt;
	 CLGLEXT.policy_number,&lt;BR /&gt;
	 CLGLEXT.amount,&lt;BR /&gt;
	 CLGLEXT.narrative,&lt;BR /&gt;
	 CLGLEXT.generation_date FORMAT=DDMMYY10.,&lt;BR /&gt;
	 CLGLEXT.class_code,&lt;BR /&gt;
	 CLGLEXT.transaction_code,&lt;BR /&gt;
	 CLGLEXT.batch_id,&lt;BR /&gt;
	 CLGLEXT.cr_acc_no,&lt;BR /&gt;
	 CLGLEXT.dr_acc_no,&lt;BR /&gt;
	 CLGLEXT.agent,&lt;BR /&gt;
	 CLGLEXT.last_acc_date FORMAT=DDMMYY10.,&lt;BR /&gt;
	 CLGLEXT.renewal_date FORMAT=DDMMYY10.,&lt;BR /&gt;
	 CLGLEXT.basic_prem_prop,&lt;BR /&gt;
	 CLGLEXT.levy,&lt;BR /&gt;
	 CLGLEXT.sfile,&lt;BR /&gt;
	 CLASSIC_MAPPINGS.'GL Code'n &lt;BR /&gt;
 FROM CL_GLEXT.CLGLEXT AS CLGLEXT &lt;BR /&gt;
	  LEFT JOIN CLGLPOST.CLASSIC_MAPPINGS AS CLASSIC_MAPPINGS ON &lt;BR /&gt;
		(CLGLEXT.account_code = CLASSIC_MAPPINGS.'Source Account'n) AND &lt;BR /&gt;
		(CLGLEXT.accounting_date &amp;gt;= CLASSIC_MAPPINGS.'Start Date'n) AND &lt;BR /&gt;
		(CLGLEXT.accounting_date &amp;lt;= CLASSIC_MAPPINGS.'End Date'n)&lt;BR /&gt;
 AND CLASSIC_MAPPINGS.Enabled = "*";&lt;BR /&gt;
QUIT;&lt;BR /&gt;
&lt;BR /&gt;
However, using the EG GUI, I am only able to do the following:-&lt;BR /&gt;
&lt;BR /&gt;
PROC SQL;&lt;BR /&gt;
 CREATE TABLE WORK.Query_for_CLGLEXT AS SELECT CLGLEXT.account_code,&lt;BR /&gt;
	 CLGLEXT.accounting_date FORMAT=DDMMYY10.,&lt;BR /&gt;
	 CLGLEXT.policy_number,&lt;BR /&gt;
	 CLGLEXT.amount,&lt;BR /&gt;
	 CLGLEXT.narrative,&lt;BR /&gt;
	 CLGLEXT.generation_date FORMAT=DDMMYY10.,&lt;BR /&gt;
	 CLGLEXT.class_code,&lt;BR /&gt;
	 CLGLEXT.transaction_code,&lt;BR /&gt;
	 CLGLEXT.batch_id,&lt;BR /&gt;
	 CLGLEXT.cr_acc_no,&lt;BR /&gt;
	 CLGLEXT.dr_acc_no,&lt;BR /&gt;
	 CLGLEXT.agent,&lt;BR /&gt;
	 CLGLEXT.last_acc_date FORMAT=DDMMYY10.,&lt;BR /&gt;
	 CLGLEXT.renewal_date FORMAT=DDMMYY10.,&lt;BR /&gt;
	 CLGLEXT.basic_prem_prop,&lt;BR /&gt;
	 CLGLEXT.levy,&lt;BR /&gt;
	 CLGLEXT.sfile,&lt;BR /&gt;
	 CLASSIC_MAPPINGS.'GL Code'n &lt;BR /&gt;
 FROM CL_GLEXT.CLGLEXT AS CLGLEXT &lt;BR /&gt;
	  LEFT JOIN CLGLPOST.CLASSIC_MAPPINGS AS CLASSIC_MAPPINGS ON (CLGLEXT.account_code = CLASSIC_MAPPINGS.'Source Account'n) AND (CLGLEXT.accounting_date &amp;gt;= CLASSIC_MAPPINGS.'Start Date'n) AND (CLGLEXT.accounting_date &amp;lt;= CLASSIC_MAPPINGS.'End Date'n)&lt;BR /&gt;
 WHERE CLASSIC_MAPPINGS.Enabled = "*";&lt;BR /&gt;
QUIT;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Why can't the GUI implement the additional test on the left join? I cannot see where to enable the condition that can be achieved in the manual version. Can anyone point me in the right direction, or can SAS take this as a bug in EG4.1?</description>
    <pubDate>Wed, 20 Dec 2006 14:13:30 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2006-12-20T14:13:30Z</dc:date>
    <item>
      <title>Enterprise Guide does not merge tables as intended</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-does-not-merge-tables-as-intended/m-p/1987#M665</link>
      <description>I am trying to join two tables. One is the main data table and the other (from which I need one field), is relatively small. I am joining using a Left Join on two fields in the main table and three fields in the secondary table. To do this properly in Proc SQL, I would manually code this as follows:-&lt;BR /&gt;
PROC SQL;&lt;BR /&gt;
 CREATE TABLE WORK.Query_for_CLGLEXT AS SELECT CLGLEXT.account_code,&lt;BR /&gt;
	 CLGLEXT.accounting_date FORMAT=DDMMYY10.,&lt;BR /&gt;
	 CLGLEXT.policy_number,&lt;BR /&gt;
	 CLGLEXT.amount,&lt;BR /&gt;
	 CLGLEXT.narrative,&lt;BR /&gt;
	 CLGLEXT.generation_date FORMAT=DDMMYY10.,&lt;BR /&gt;
	 CLGLEXT.class_code,&lt;BR /&gt;
	 CLGLEXT.transaction_code,&lt;BR /&gt;
	 CLGLEXT.batch_id,&lt;BR /&gt;
	 CLGLEXT.cr_acc_no,&lt;BR /&gt;
	 CLGLEXT.dr_acc_no,&lt;BR /&gt;
	 CLGLEXT.agent,&lt;BR /&gt;
	 CLGLEXT.last_acc_date FORMAT=DDMMYY10.,&lt;BR /&gt;
	 CLGLEXT.renewal_date FORMAT=DDMMYY10.,&lt;BR /&gt;
	 CLGLEXT.basic_prem_prop,&lt;BR /&gt;
	 CLGLEXT.levy,&lt;BR /&gt;
	 CLGLEXT.sfile,&lt;BR /&gt;
	 CLASSIC_MAPPINGS.'GL Code'n &lt;BR /&gt;
 FROM CL_GLEXT.CLGLEXT AS CLGLEXT &lt;BR /&gt;
	  LEFT JOIN CLGLPOST.CLASSIC_MAPPINGS AS CLASSIC_MAPPINGS ON &lt;BR /&gt;
		(CLGLEXT.account_code = CLASSIC_MAPPINGS.'Source Account'n) AND &lt;BR /&gt;
		(CLGLEXT.accounting_date &amp;gt;= CLASSIC_MAPPINGS.'Start Date'n) AND &lt;BR /&gt;
		(CLGLEXT.accounting_date &amp;lt;= CLASSIC_MAPPINGS.'End Date'n)&lt;BR /&gt;
 AND CLASSIC_MAPPINGS.Enabled = "*";&lt;BR /&gt;
QUIT;&lt;BR /&gt;
&lt;BR /&gt;
However, using the EG GUI, I am only able to do the following:-&lt;BR /&gt;
&lt;BR /&gt;
PROC SQL;&lt;BR /&gt;
 CREATE TABLE WORK.Query_for_CLGLEXT AS SELECT CLGLEXT.account_code,&lt;BR /&gt;
	 CLGLEXT.accounting_date FORMAT=DDMMYY10.,&lt;BR /&gt;
	 CLGLEXT.policy_number,&lt;BR /&gt;
	 CLGLEXT.amount,&lt;BR /&gt;
	 CLGLEXT.narrative,&lt;BR /&gt;
	 CLGLEXT.generation_date FORMAT=DDMMYY10.,&lt;BR /&gt;
	 CLGLEXT.class_code,&lt;BR /&gt;
	 CLGLEXT.transaction_code,&lt;BR /&gt;
	 CLGLEXT.batch_id,&lt;BR /&gt;
	 CLGLEXT.cr_acc_no,&lt;BR /&gt;
	 CLGLEXT.dr_acc_no,&lt;BR /&gt;
	 CLGLEXT.agent,&lt;BR /&gt;
	 CLGLEXT.last_acc_date FORMAT=DDMMYY10.,&lt;BR /&gt;
	 CLGLEXT.renewal_date FORMAT=DDMMYY10.,&lt;BR /&gt;
	 CLGLEXT.basic_prem_prop,&lt;BR /&gt;
	 CLGLEXT.levy,&lt;BR /&gt;
	 CLGLEXT.sfile,&lt;BR /&gt;
	 CLASSIC_MAPPINGS.'GL Code'n &lt;BR /&gt;
 FROM CL_GLEXT.CLGLEXT AS CLGLEXT &lt;BR /&gt;
	  LEFT JOIN CLGLPOST.CLASSIC_MAPPINGS AS CLASSIC_MAPPINGS ON (CLGLEXT.account_code = CLASSIC_MAPPINGS.'Source Account'n) AND (CLGLEXT.accounting_date &amp;gt;= CLASSIC_MAPPINGS.'Start Date'n) AND (CLGLEXT.accounting_date &amp;lt;= CLASSIC_MAPPINGS.'End Date'n)&lt;BR /&gt;
 WHERE CLASSIC_MAPPINGS.Enabled = "*";&lt;BR /&gt;
QUIT;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Why can't the GUI implement the additional test on the left join? I cannot see where to enable the condition that can be achieved in the manual version. Can anyone point me in the right direction, or can SAS take this as a bug in EG4.1?</description>
      <pubDate>Wed, 20 Dec 2006 14:13:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-does-not-merge-tables-as-intended/m-p/1987#M665</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2006-12-20T14:13:30Z</dc:date>
    </item>
    <item>
      <title>Re: Enterprise Guide does not merge tables as intended</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-does-not-merge-tables-as-intended/m-p/1988#M666</link>
      <description>Chris,&lt;BR /&gt;
&lt;BR /&gt;
I am not sure if I am seeing the same problem that you do. The only difference I see in your two pieces of SQL are that your manually coded version contains the:&lt;BR /&gt;
&lt;BR /&gt;
CLASSIC_MAPPINGS.Enabled = "*"&lt;BR /&gt;
&lt;BR /&gt;
selection criterion as part of the ON whereas in the version generated by SAS/EG the same criterion is included as part of a stand-alone WHERE clause following the ON.&lt;BR /&gt;
&lt;BR /&gt;
I would guess that in this case your actual results would be identical. Is this not the case for you ? If your results are not the same, what are the differences ?&lt;BR /&gt;
&lt;BR /&gt;
Cheers.&lt;BR /&gt;
&lt;BR /&gt;
Down-Under Dave.</description>
      <pubDate>Wed, 03 Jan 2007 09:32:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Enterprise-Guide-does-not-merge-tables-as-intended/m-p/1988#M666</guid>
      <dc:creator>DaveShea</dc:creator>
      <dc:date>2007-01-03T09:32:27Z</dc:date>
    </item>
  </channel>
</rss>

