<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Outer Joins and Effdt</title>
	<atom:link href="http://peoplesofttipster.com/2007/06/26/outer-joins-and-effdt/feed/" rel="self" type="application/rss+xml" />
	<link>http://peoplesofttipster.com/2007/06/26/outer-joins-and-effdt/</link>
	<description>Tips and Tricks with a PeopleSoft slant</description>
	<lastBuildDate>Fri, 30 Jul 2010 07:17:16 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Flashin Leather</title>
		<link>http://peoplesofttipster.com/2007/06/26/outer-joins-and-effdt/#comment-994</link>
		<dc:creator>Flashin Leather</dc:creator>
		<pubDate>Fri, 17 Jul 2009 15:06:35 +0000</pubDate>
		<guid isPermaLink="false">http://peoplesofttipster.com/2007/06/26/outer-joins-and-effdt/#comment-994</guid>
		<description>&lt;strong&gt;Outer Joins Not Working...&lt;/strong&gt;

If you are having problem getting outer joins to work, it may be due to nested effective date logic.  Here is a link to blog post that helped me.

...</description>
		<content:encoded><![CDATA[<p><strong>Outer Joins Not Working&#8230;</strong></p>
<p>If you are having problem getting outer joins to work, it may be due to nested effective date logic.  Here is a link to blog post that helped me.</p>
<p>&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Haricharan</title>
		<link>http://peoplesofttipster.com/2007/06/26/outer-joins-and-effdt/#comment-737</link>
		<dc:creator>Haricharan</dc:creator>
		<pubDate>Tue, 01 Apr 2008 15:56:41 +0000</pubDate>
		<guid isPermaLink="false">http://peoplesofttipster.com/2007/06/26/outer-joins-and-effdt/#comment-737</guid>
		<description>I had a requirement where the supervisor id and supervisor name should be shown in the PS Query, the issue was the employees who doesnt have supervisor id are not shown in the result. I tried to do outer join using all the methods mentioned above. Nothing worked. At the end I had to do the UNION of the employees who doesnt have supervisor id (with a dummy column for a supervisor name) and the previous result....and at the end I achieved the outer join. But it takes more time...</description>
		<content:encoded><![CDATA[<p>I had a requirement where the supervisor id and supervisor name should be shown in the PS Query, the issue was the employees who doesnt have supervisor id are not shown in the result. I tried to do outer join using all the methods mentioned above. Nothing worked. At the end I had to do the UNION of the employees who doesnt have supervisor id (with a dummy column for a supervisor name) and the previous result&#8230;.and at the end I achieved the outer join. But it takes more time&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PeopleSoft Tipster</title>
		<link>http://peoplesofttipster.com/2007/06/26/outer-joins-and-effdt/#comment-717</link>
		<dc:creator>PeopleSoft Tipster</dc:creator>
		<pubDate>Wed, 12 Mar 2008 23:04:19 +0000</pubDate>
		<guid isPermaLink="false">http://peoplesofttipster.com/2007/06/26/outer-joins-and-effdt/#comment-717</guid>
		<description>You&#039;re right, it does.

I&#039;d avoided trying that as I know you have to be careful putting &#039;non-join&#039; conditions in the from clause.  Have a look at:
http://www.oreillynet.com/pub/a/network/2002/10/01/whatsinacondition.html</description>
		<content:encoded><![CDATA[<p>You&#8217;re right, it does.</p>
<p>I&#8217;d avoided trying that as I know you have to be careful putting &#8216;non-join&#8217; conditions in the from clause.  Have a look at:<br />
<a href="http://www.oreillynet.com/pub/a/network/2002/10/01/whatsinacondition.html" rel="nofollow">http://www.oreillynet.com/pub/a/network/2002/10/01/whatsinacondition.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: quentin</title>
		<link>http://peoplesofttipster.com/2007/06/26/outer-joins-and-effdt/#comment-716</link>
		<dc:creator>quentin</dc:creator>
		<pubDate>Wed, 12 Mar 2008 14:55:49 +0000</pubDate>
		<guid isPermaLink="false">http://peoplesofttipster.com/2007/06/26/outer-joins-and-effdt/#comment-716</guid>
		<description>I would have thought the following would do it:

select PD.EMPLID, PD.NAME, J.LOCATION
from PS_PERSONAL_DATA PD
left join PS_JOB J on J.EMPLID = PD.EMPLID 
and J.EFFDT = (select max(J1.EFFDT from PS_JOB J1 where...)</description>
		<content:encoded><![CDATA[<p>I would have thought the following would do it:</p>
<p>select PD.EMPLID, PD.NAME, J.LOCATION<br />
from PS_PERSONAL_DATA PD<br />
left join PS_JOB J on J.EMPLID = PD.EMPLID<br />
and J.EFFDT = (select max(J1.EFFDT from PS_JOB J1 where&#8230;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PeopleSoft Tipster</title>
		<link>http://peoplesofttipster.com/2007/06/26/outer-joins-and-effdt/#comment-135</link>
		<dc:creator>PeopleSoft Tipster</dc:creator>
		<pubDate>Wed, 04 Jul 2007 21:47:58 +0000</pubDate>
		<guid isPermaLink="false">http://peoplesofttipster.com/2007/06/26/outer-joins-and-effdt/#comment-135</guid>
		<description>Ok, I&#039;ve had a look and it seems that using 
&#039;J.EFFDT in(null, (SELECT MAX(J1.EFFDT) ...&#039;
gives the same results as all of the other queries apart from the inline view, i.e. if there is only a future dated row in the outer joined to table it  doesn&#039;t show the row from the first table either.  

So - for this specific set of circumstances - it seems only the inline view method gives the correct results.  

Can anyone improve on this?</description>
		<content:encoded><![CDATA[<p>Ok, I&#8217;ve had a look and it seems that using<br />
&#8216;J.EFFDT in(null, (SELECT MAX(J1.EFFDT) &#8230;&#8217;<br />
gives the same results as all of the other queries apart from the inline view, i.e. if there is only a future dated row in the outer joined to table it  doesn&#8217;t show the row from the first table either.  </p>
<p>So &#8211; for this specific set of circumstances &#8211; it seems only the inline view method gives the correct results.  </p>
<p>Can anyone improve on this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: PeopleSoft Tipster</title>
		<link>http://peoplesofttipster.com/2007/06/26/outer-joins-and-effdt/#comment-131</link>
		<dc:creator>PeopleSoft Tipster</dc:creator>
		<pubDate>Tue, 03 Jul 2007 23:04:31 +0000</pubDate>
		<guid isPermaLink="false">http://peoplesofttipster.com/2007/06/26/outer-joins-and-effdt/#comment-131</guid>
		<description>Reviewing the post, I perhaps could have explained what I was trying to do a little better.  In 99% of cases if you have an Effdt clause and the data only has a future dated row then you would want the data to be excluded.  This situation was a little different however.  

I had a record (in the example it was Personal Data) which had some employee data, and I&#039;d outer joined to Job data.  If the only row in job was a future dated row, I still wanted to retrieve the Personal Data row and have nulls for the Job data.  

From my testing I discovered that the first two methods omit the row altogether - as though it doesn&#039;t exist in Personal Data either - which is clearly not what we want.  Only the Inline View returns the &#039;correct&#039; result set.

I can&#039;t seem to get the results I was getting when I wrote the post on my SQL Server VM.  I&#039;ll try it on as Oracle environment tomorrow and report back.</description>
		<content:encoded><![CDATA[<p>Reviewing the post, I perhaps could have explained what I was trying to do a little better.  In 99% of cases if you have an Effdt clause and the data only has a future dated row then you would want the data to be excluded.  This situation was a little different however.  </p>
<p>I had a record (in the example it was Personal Data) which had some employee data, and I&#8217;d outer joined to Job data.  If the only row in job was a future dated row, I still wanted to retrieve the Personal Data row and have nulls for the Job data.  </p>
<p>From my testing I discovered that the first two methods omit the row altogether &#8211; as though it doesn&#8217;t exist in Personal Data either &#8211; which is clearly not what we want.  Only the Inline View returns the &#8216;correct&#8217; result set.</p>
<p>I can&#8217;t seem to get the results I was getting when I wrote the post on my SQL Server VM.  I&#8217;ll try it on as Oracle environment tomorrow and report back.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jim J. Marion</title>
		<link>http://peoplesofttipster.com/2007/06/26/outer-joins-and-effdt/#comment-122</link>
		<dc:creator>Jim J. Marion</dc:creator>
		<pubDate>Mon, 02 Jul 2007 13:15:55 +0000</pubDate>
		<guid isPermaLink="false">http://peoplesofttipster.com/2007/06/26/outer-joins-and-effdt/#comment-122</guid>
		<description>In your OR scenario above, you said, &quot;...it would omit data which has a row in the second table - but where the Effdt is after the AsOfDate.&quot;  Isn&#039;t that the point?  Actually, it isn&quot;t the NULL that will cause this, it is the supplied AsOfDate (SYSDATE in your example above).

Try using IN rather than OR: A.EFFDT IN (NULL, (SELECT MAX(A_EFF.EFFDT) FROM...)). Unfortunately, I don&#039;t have a PeopleSoft database in front of me to test this. Like you, I have tried several alternatives. The problem with the OR is that it causes Oracle to run 2 queries, one for each case in the OR.

It is good to have multiple alternatives. The alternative that is best for one query may not be the best for another query.</description>
		<content:encoded><![CDATA[<p>In your OR scenario above, you said, &#8220;&#8230;it would omit data which has a row in the second table &#8211; but where the Effdt is after the AsOfDate.&#8221;  Isn&#8217;t that the point?  Actually, it isn&#8221;t the NULL that will cause this, it is the supplied AsOfDate (SYSDATE in your example above).</p>
<p>Try using IN rather than OR: A.EFFDT IN (NULL, (SELECT MAX(A_EFF.EFFDT) FROM&#8230;)). Unfortunately, I don&#8217;t have a PeopleSoft database in front of me to test this. Like you, I have tried several alternatives. The problem with the OR is that it causes Oracle to run 2 queries, one for each case in the OR.</p>
<p>It is good to have multiple alternatives. The alternative that is best for one query may not be the best for another query.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
