<?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/"
		>
<channel>
	<title>Comments on: PeopleSoft Trees via SQL</title>
	<atom:link href="http://www.tysonmoore.net/public/2010/01/peoplesoft-trees-via-sql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tysonmoore.net/public/2010/01/peoplesoft-trees-via-sql/</link>
	<description>Consultant, Developer, Volunteer</description>
	<lastBuildDate>Thu, 04 Mar 2010 18:34:24 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Sri</title>
		<link>http://www.tysonmoore.net/public/2010/01/peoplesoft-trees-via-sql/comment-page-1/#comment-29</link>
		<dc:creator>Sri</dc:creator>
		<pubDate>Thu, 04 Mar 2010 18:34:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.tysonmoore.net/public/?p=27#comment-29</guid>
		<description>Thank you tyson for reply.

the information I am looking for is:-
for example:-
level 1:- A
level 2:- B
level 3:- C. 

Each employee is assigned to C. 

The sql I am looking at is to retrieve A,B,C. So that I can generate a report for A.

can you let me know if I confused you.

Thanks,</description>
		<content:encoded><![CDATA[<p>Thank you tyson for reply.</p>
<p>the information I am looking for is:-<br />
for example:-<br />
level 1:- A<br />
level 2:- B<br />
level 3:- C. </p>
<p>Each employee is assigned to C. </p>
<p>The sql I am looking at is to retrieve A,B,C. So that I can generate a report for A.</p>
<p>can you let me know if I confused you.</p>
<p>Thanks,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tyson</title>
		<link>http://www.tysonmoore.net/public/2010/01/peoplesoft-trees-via-sql/comment-page-1/#comment-28</link>
		<dc:creator>Tyson</dc:creator>
		<pubDate>Thu, 04 Mar 2010 17:00:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.tysonmoore.net/public/?p=27#comment-28</guid>
		<description>Sri,

Certainly.  I assume your tree just has nodes, no detail values/leafs?  If this is the case, and you just want to get the structure, the following SQL should work:

&lt;pre name=&quot;code&quot; class=&quot;sql&quot;&gt;
SELECT PSTREENODE.SETID,
  PSTREENODE.TREE_NAME,
  PSTREENODE.EFFDT,
  PARENT_NODE_NAME AS PARENTNODE,
  TREE_NODE        AS NODENAME,
  TREE_NODE        AS TREENODE,
  TREE_LEVEL_NUM,
  TREE_NODE_NUM
FROM PSTREENODE
  --- REPLACE WITH YOUR SETID
WHERE PSTREENODE.SETID = &#039;SHARE&#039;
  --- REPLACE WITH YOUR TREE NAME
AND TREE_NAME = &#039;ACCOUNT&#039;
  --- REPLACE WITH YOUR TREE EFFECTIVE DATE
AND EFFDT = TO_DATE(&#039;01011900&#039;,&#039;MMDDYYYY&#039;)
UNION ALL
--- REPLACE WITH YOUR SETID
SELECT &#039;SHARE&#039;,
  N.TREE_NAME,
  --- REPLACE WITH YOUR TREE EFFECTIVE DATE
  TO_DATE(&#039;01011900&#039;,&#039;MMDDYYYY&#039;),
  N.TREE_NODE AS PARENTNODE,
  &#039; &#039;,
  &#039; &#039;,
  TREE_LEVEL_NUM,
  N.TREE_NODE_NUM
FROM PSTREENODE N
  --- REPLACE WITH YOUR TREE NAME
  WHERE TREE_NAME = &#039;ACCOUNT&#039;
  --- REPLACE WITH YOUR TREE EFFECTIVE DATE
  AND EFFDT = TO_DATE(&#039;01011900&#039;,&#039;MMDDYYYY&#039;)
ORDER BY TREE_NODE_NUM,
  TREE_LEVEL_NUM,
  TREENODE;
&lt;/pre&gt;

Let me know if you have any additional questions, or if you were looking for something else.  Thanks!

-Tyson</description>
		<content:encoded><![CDATA[<p>Sri,</p>
<p>Certainly.  I assume your tree just has nodes, no detail values/leafs?  If this is the case, and you just want to get the structure, the following SQL should work:</p>
<pre name="code" class="sql">
SELECT PSTREENODE.SETID,
  PSTREENODE.TREE_NAME,
  PSTREENODE.EFFDT,
  PARENT_NODE_NAME AS PARENTNODE,
  TREE_NODE        AS NODENAME,
  TREE_NODE        AS TREENODE,
  TREE_LEVEL_NUM,
  TREE_NODE_NUM
FROM PSTREENODE
  --- REPLACE WITH YOUR SETID
WHERE PSTREENODE.SETID = 'SHARE'
  --- REPLACE WITH YOUR TREE NAME
AND TREE_NAME = 'ACCOUNT'
  --- REPLACE WITH YOUR TREE EFFECTIVE DATE
AND EFFDT = TO_DATE('01011900','MMDDYYYY')
UNION ALL
--- REPLACE WITH YOUR SETID
SELECT 'SHARE',
  N.TREE_NAME,
  --- REPLACE WITH YOUR TREE EFFECTIVE DATE
  TO_DATE('01011900','MMDDYYYY'),
  N.TREE_NODE AS PARENTNODE,
  ' ',
  ' ',
  TREE_LEVEL_NUM,
  N.TREE_NODE_NUM
FROM PSTREENODE N
  --- REPLACE WITH YOUR TREE NAME
  WHERE TREE_NAME = 'ACCOUNT'
  --- REPLACE WITH YOUR TREE EFFECTIVE DATE
  AND EFFDT = TO_DATE('01011900','MMDDYYYY')
ORDER BY TREE_NODE_NUM,
  TREE_LEVEL_NUM,
  TREENODE;
</pre>
<p>Let me know if you have any additional questions, or if you were looking for something else.  Thanks!</p>
<p>-Tyson</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sri</title>
		<link>http://www.tysonmoore.net/public/2010/01/peoplesoft-trees-via-sql/comment-page-1/#comment-27</link>
		<dc:creator>Sri</dc:creator>
		<pubDate>Thu, 04 Mar 2010 16:49:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.tysonmoore.net/public/?p=27#comment-27</guid>
		<description>Hi Tyson,

   I am using the above sql to retrieve the parent node,child nodes(till the last level). But when the table PSTREELEAF is empty. so unable to retrieve data. Is there any other table that store this inforamtion?

Thanks,
S</description>
		<content:encoded><![CDATA[<p>Hi Tyson,</p>
<p>   I am using the above sql to retrieve the parent node,child nodes(till the last level). But when the table PSTREELEAF is empty. so unable to retrieve data. Is there any other table that store this inforamtion?</p>
<p>Thanks,<br />
S</p>
]]></content:encoded>
	</item>
</channel>
</rss>
