<?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: Load-Lookup Love Letter: Introduction</title>
	<atom:link href="http://peoplesoftsqr.com/index.php/2009/02/load-lookup-love-letter-introduction/feed/" rel="self" type="application/rss+xml" />
	<link>http://peoplesoftsqr.com/index.php/2009/02/load-lookup-love-letter-introduction/</link>
	<description>When Peoplebooks Is Not Enough</description>
	<lastBuildDate>Mon, 16 Aug 2010 16:52:22 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: administrator</title>
		<link>http://peoplesoftsqr.com/index.php/2009/02/load-lookup-love-letter-introduction/comment-page-1/#comment-5940</link>
		<dc:creator>administrator</dc:creator>
		<pubDate>Wed, 23 Jun 2010 14:07:14 +0000</pubDate>
		<guid isPermaLink="false">http://peoplesoftsqr.com/?p=200#comment-5940</guid>
		<description>Wow, Prashanth, that is a very large query!  The &quot;where&quot; parameter in load-lookup is limited to 256 characters, and the &quot;table&quot; parameter must be a literal string on a single line.  That&#039;s going to be hard to write and harder to read.  Try creating database views that encapsulate as much logic as you can.  The SQL statement for a view can join tables and be as long as you need.  Then you can use the view in the load-lookup statement and it will appear simple.</description>
		<content:encoded><![CDATA[<p>Wow, Prashanth, that is a very large query!  The &#8220;where&#8221; parameter in load-lookup is limited to 256 characters, and the &#8220;table&#8221; parameter must be a literal string on a single line.  That&#8217;s going to be hard to write and harder to read.  Try creating database views that encapsulate as much logic as you can.  The SQL statement for a view can join tables and be as long as you need.  Then you can use the view in the load-lookup statement and it will appear simple.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: prashanth</title>
		<link>http://peoplesoftsqr.com/index.php/2009/02/load-lookup-love-letter-introduction/comment-page-1/#comment-5933</link>
		<dc:creator>prashanth</dc:creator>
		<pubDate>Mon, 14 Jun 2010 08:00:47 +0000</pubDate>
		<guid isPermaLink="false">http://peoplesoftsqr.com/?p=200#comment-5933</guid>
		<description>How can i write a query using load lookup for joining two or more tables...
Here is my query..Can you just change the query using load lookup...

begin-select
	
	alter-printer
        font={CourierFont}
        point-size={PointSize2}


a.account_name			(,{Col1},{Col1Width})    on-break level=1  
sh.service_name			(,{Col2},{Col2Width})   on-break level=2 
!i.effective_date  		(,{Col3},{Col3Width})  !Edit {TaskQueueDTFormat}
to_char(i.effective_date,&#039;dd-mm-yyyy hh24:mi:ss&#039;)   &amp;BillDate    (,{Col3},{Col3Width})
        move &amp;BillDate to  $BillDate
i.invoice_id			(,{Col4},{Col4Width})   
a.unbilled_amount		(,{Col5},{Col5Width})    Edit {NumberMask}
sh.general_1        &amp;RatePlan
	move &amp;RatePlan to #RatePlan
sh.general_2   &amp;ServiceCategory
	move &amp;ServiceCategory to  #ServiceCategory
sh.general_4   &amp;ConnectionType
	move &amp;ConnectionType to #ConnectionType
sh.general_5	&amp;CircuitType
	move &amp;CircuitType to #CircuitType
sh.general_6   &amp;SubscriptionType
	move &amp;SubscriptionType to #SubscriptionType
pih.product_id   &amp;ProdId
	move &amp;ProdId to #ProdId
	
  do RequiredRentAmount
	
	position (+1)

from account a,service_history sh,invoice i,reference_code rc,customer_node_history cnh,product_instance_history pih
where sh.customer_node_id=a.customer_node_id 
and a.invoice_id=i.invoice_id
and a.account_id=i.account_id
and a.account_type_id=10000
and i.invoice_type_id=1000020
and sh.BASE_PRODUCT_INSTANCE_ID = pih.PRODUCT_INSTANCE_ID
			and pih.BASE_PRODUCT_INSTANCE_ID is null
			and sh.customer_node_id=pih.customer_node_id
and sh.service_id=(select max(service_id) from service_history sh,product_instance_history pih 
			where sh.BASE_PRODUCT_INSTANCE_ID = pih.PRODUCT_INSTANCE_ID
			and pih.BASE_PRODUCT_INSTANCE_ID is null
			and sh.customer_node_id=cnh.customer_node_id)
and to_char(rc.reference_code)=sh.general_1
and rc.reference_type_id in(select reference_type_id from reference_type where type_label like $PlanName)
and cnh.region_code=#ref_code
and sh.customer_node_id=cnh.customer_node_id
and a.customer_node_id=cnh.customer_node_id
and i.customer_node_id=cnh.customer_node_id  
and trunc(a.LAST_MODIFIED) between trunc(to_date($ReportStDate,&#039;dd-mm-yyyy hh24:mi:ss&#039;))
and trunc(to_date($RptEndDate,&#039;dd-mm-yyyy hh24:mi:ss&#039;))
and trunc(a.LAST_MODIFIED) between trunc(sh.effective_start_date) and trunc(sh.effective_end_date)
and trunc(a.LAST_MODIFIED) between trunc(cnh.effective_start_date) and trunc(cnh.effective_end_date)
and trunc(a.LAST_MODIFIED) between trunc(pih.effective_start_date) and trunc(pih.effective_end_date)
!and cnh.node_name like &#039;PcustomerAccured5&#039;

end-select




SOMEONE PLEASE DO THE NEEDFUL AS IT IS HIGHLY ESSENTIAL FOR PERFORMANCE........</description>
		<content:encoded><![CDATA[<p>How can i write a query using load lookup for joining two or more tables&#8230;<br />
Here is my query..Can you just change the query using load lookup&#8230;</p>
<p>begin-select</p>
<p>	alter-printer<br />
        font={CourierFont}<br />
        point-size={PointSize2}</p>
<p>a.account_name			(,{Col1},{Col1Width})    on-break level=1<br />
sh.service_name			(,{Col2},{Col2Width})   on-break level=2<br />
!i.effective_date  		(,{Col3},{Col3Width})  !Edit {TaskQueueDTFormat}<br />
to_char(i.effective_date,&#8217;dd-mm-yyyy hh24:mi:ss&#8217;)   &amp;BillDate    (,{Col3},{Col3Width})<br />
        move &amp;BillDate to  $BillDate<br />
i.invoice_id			(,{Col4},{Col4Width})<br />
a.unbilled_amount		(,{Col5},{Col5Width})    Edit {NumberMask}<br />
sh.general_1        &amp;RatePlan<br />
	move &amp;RatePlan to #RatePlan<br />
sh.general_2   &amp;ServiceCategory<br />
	move &amp;ServiceCategory to  #ServiceCategory<br />
sh.general_4   &amp;ConnectionType<br />
	move &amp;ConnectionType to #ConnectionType<br />
sh.general_5	&amp;CircuitType<br />
	move &amp;CircuitType to #CircuitType<br />
sh.general_6   &amp;SubscriptionType<br />
	move &amp;SubscriptionType to #SubscriptionType<br />
pih.product_id   &amp;ProdId<br />
	move &amp;ProdId to #ProdId</p>
<p>  do RequiredRentAmount</p>
<p>	position (+1)</p>
<p>from account a,service_history sh,invoice i,reference_code rc,customer_node_history cnh,product_instance_history pih<br />
where sh.customer_node_id=a.customer_node_id<br />
and a.invoice_id=i.invoice_id<br />
and a.account_id=i.account_id<br />
and a.account_type_id=10000<br />
and i.invoice_type_id=1000020<br />
and sh.BASE_PRODUCT_INSTANCE_ID = pih.PRODUCT_INSTANCE_ID<br />
			and pih.BASE_PRODUCT_INSTANCE_ID is null<br />
			and sh.customer_node_id=pih.customer_node_id<br />
and sh.service_id=(select max(service_id) from service_history sh,product_instance_history pih<br />
			where sh.BASE_PRODUCT_INSTANCE_ID = pih.PRODUCT_INSTANCE_ID<br />
			and pih.BASE_PRODUCT_INSTANCE_ID is null<br />
			and sh.customer_node_id=cnh.customer_node_id)<br />
and to_char(rc.reference_code)=sh.general_1<br />
and rc.reference_type_id in(select reference_type_id from reference_type where type_label like $PlanName)<br />
and cnh.region_code=#ref_code<br />
and sh.customer_node_id=cnh.customer_node_id<br />
and a.customer_node_id=cnh.customer_node_id<br />
and i.customer_node_id=cnh.customer_node_id<br />
and trunc(a.LAST_MODIFIED) between trunc(to_date($ReportStDate,&#8217;dd-mm-yyyy hh24:mi:ss&#8217;))<br />
and trunc(to_date($RptEndDate,&#8217;dd-mm-yyyy hh24:mi:ss&#8217;))<br />
and trunc(a.LAST_MODIFIED) between trunc(sh.effective_start_date) and trunc(sh.effective_end_date)<br />
and trunc(a.LAST_MODIFIED) between trunc(cnh.effective_start_date) and trunc(cnh.effective_end_date)<br />
and trunc(a.LAST_MODIFIED) between trunc(pih.effective_start_date) and trunc(pih.effective_end_date)<br />
!and cnh.node_name like &#8216;PcustomerAccured5&#8242;</p>
<p>end-select</p>
<p>SOMEONE PLEASE DO THE NEEDFUL AS IT IS HIGHLY ESSENTIAL FOR PERFORMANCE&#8230;&#8230;..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: administrator</title>
		<link>http://peoplesoftsqr.com/index.php/2009/02/load-lookup-love-letter-introduction/comment-page-1/#comment-964</link>
		<dc:creator>administrator</dc:creator>
		<pubDate>Sun, 05 Jul 2009 18:21:45 +0000</pubDate>
		<guid isPermaLink="false">http://peoplesoftsqr.com/?p=200#comment-964</guid>
		<description>Very good, you solved it better than I had.  I didn&#039;t think of using the built-in #page-count variable.</description>
		<content:encoded><![CDATA[<p>Very good, you solved it better than I had.  I didn&#8217;t think of using the built-in #page-count variable.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sundeep Kumar</title>
		<link>http://peoplesoftsqr.com/index.php/2009/02/load-lookup-love-letter-introduction/comment-page-1/#comment-752</link>
		<dc:creator>Sundeep Kumar</dc:creator>
		<pubDate>Mon, 22 Jun 2009 18:18:54 +0000</pubDate>
		<guid isPermaLink="false">http://peoplesoftsqr.com/?p=200#comment-752</guid>
		<description>!Final Solution to the Brain Teaser

&lt;code&gt;Begin-Heading 1
&nsbp;&nsbp;Print $NAME (+1,70)
End-Heading&lt;/code&gt;

&lt;code&gt;Begin-footing 1
&nsbp;&nsbp;Print &amp;NAME (,70)
End-footing&lt;/code&gt;


&lt;code&gt;Begin-Program
Begin-Select
EMPLID
NAME	
&nsbp;&nsbp;Print &amp;EMPLID (+1,1,20)
&nsbp;&nsbp;If #PAGE-COUNT &lt;&gt; #OLD 
&nsbp;&nsbp;&nsbp;&nsbp;Let $NAME = &amp;NAME
&nsbp;&nsbp;End-If	
&nsbp;&nsbp;Print &amp;NAME   (,24,30)&lt;/code&gt;
		
&lt;code&gt;&nsbp;&nsbp;Let #OLD = #PAGE-COUNT&lt;/code&gt;

&lt;code&gt;From PS_PERSONAL_DATA
where rownum &lt;200
order by EMPLID
End-Select
End-Program&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>!Final Solution to the Brain Teaser</p>
<p><code>Begin-Heading 1<br />
&nsbp;&nsbp;Print $NAME (+1,70)<br />
End-Heading</code></p>
<p><code>Begin-footing 1<br />
&nsbp;&nsbp;Print &amp;NAME (,70)<br />
End-footing</code></p>
<p><code>Begin-Program<br />
Begin-Select<br />
EMPLID<br />
NAME<br />
&nsbp;&nsbp;Print &amp;EMPLID (+1,1,20)<br />
&nsbp;&nsbp;If #PAGE-COUNT &lt;&gt; #OLD<br />
&nsbp;&nsbp;&nsbp;&nsbp;Let $NAME = &amp;NAME<br />
&nsbp;&nsbp;End-If<br />
&nsbp;&nsbp;Print &amp;NAME   (,24,30)</code></p>
<p><code>&nsbp;&nsbp;Let #OLD = #PAGE-COUNT</code></p>
<p><code>From PS_PERSONAL_DATA<br />
where rownum &lt;200<br />
order by EMPLID<br />
End-Select<br />
End-Program</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: administrator</title>
		<link>http://peoplesoftsqr.com/index.php/2009/02/load-lookup-love-letter-introduction/comment-page-1/#comment-751</link>
		<dc:creator>administrator</dc:creator>
		<pubDate>Mon, 22 Jun 2009 17:04:57 +0000</pubDate>
		<guid isPermaLink="false">http://peoplesoftsqr.com/?p=200#comment-751</guid>
		<description>Excellent, you&#039;ve solved half the problem - printing the last name.  You are correct about the way heading and footing work.  Now,  try to determine when a name is the first on a page and save that name until the heading prints.</description>
		<content:encoded><![CDATA[<p>Excellent, you&#8217;ve solved half the problem &#8211; printing the last name.  You are correct about the way heading and footing work.  Now,  try to determine when a name is the first on a page and save that name until the heading prints.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sundeep Kumar</title>
		<link>http://peoplesoftsqr.com/index.php/2009/02/load-lookup-love-letter-introduction/comment-page-1/#comment-746</link>
		<dc:creator>Sundeep Kumar</dc:creator>
		<pubDate>Mon, 22 Jun 2009 12:25:00 +0000</pubDate>
		<guid isPermaLink="false">http://peoplesoftsqr.com/?p=200#comment-746</guid>
		<description>Yeah I did try using the Headers and footers too. The problem was when i use the variable in Heading and footing section the name of the last employee on the page is being printed always. It seems to me like the SQR first prints all the data and then prints the Header and footer for that page. Since i was using $NAME in the header and footer the last employees name of that page was printed in both header and footer.</description>
		<content:encoded><![CDATA[<p>Yeah I did try using the Headers and footers too. The problem was when i use the variable in Heading and footing section the name of the last employee on the page is being printed always. It seems to me like the SQR first prints all the data and then prints the Header and footer for that page. Since i was using $NAME in the header and footer the last employees name of that page was printed in both header and footer.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: administrator</title>
		<link>http://peoplesoftsqr.com/index.php/2009/02/load-lookup-love-letter-introduction/comment-page-1/#comment-705</link>
		<dc:creator>administrator</dc:creator>
		<pubDate>Fri, 19 Jun 2009 23:01:49 +0000</pubDate>
		<guid isPermaLink="false">http://peoplesoftsqr.com/?p=200#comment-705</guid>
		<description>You&#039;re working too hard.  Think about the &lt;strong&gt;begin-heading&lt;/strong&gt; command.  It waits until you&#039;ve filled the main body of the page, then it prints the header.  It is like a subroutine that you don&#039;t have to call, it knows when to do its work.  It has access to any global variable in the program and it can perform any command - not just &lt;strong&gt;print&lt;/strong&gt; commands.</description>
		<content:encoded><![CDATA[<p>You&#8217;re working too hard.  Think about the <strong>begin-heading</strong> command.  It waits until you&#8217;ve filled the main body of the page, then it prints the header.  It is like a subroutine that you don&#8217;t have to call, it knows when to do its work.  It has access to any global variable in the program and it can perform any command &#8211; not just <strong>print</strong> commands.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sundeep Kumar</title>
		<link>http://peoplesoftsqr.com/index.php/2009/02/load-lookup-love-letter-introduction/comment-page-1/#comment-695</link>
		<dc:creator>Sundeep Kumar</dc:creator>
		<pubDate>Fri, 19 Jun 2009 17:46:08 +0000</pubDate>
		<guid isPermaLink="false">http://peoplesoftsqr.com/?p=200#comment-695</guid>
		<description>!Below is the code for the brain teaser
! Assumption that i have taken here is that the number of lines per page is 62

Begin-Setup
	no-formfeed
End-Setup



Begin-Program
lET #I=1
Begin-Select
EMPLID
NAME
	IF MOD(#I, 59) = 1
		IF #I = 1
		Print &amp;Name (+1,70)
		ELSE
		Print &amp;Name (+1,70)
		END-IF
	eND-IF	
	
	Print &amp;EMPLID (+1,1,20)
	Print &amp;NAME   (,24,30)
	
	IF MOD(#I, 59) = 0
		Print &amp;Name (+1,70)
	eND-IF	
		
	LET #I = #I +1

From PS_PERSONAL_DATA
where rownum &lt;200
order by EMPLID
End-Select
If mod(#I - 1,59)  0
	Print &amp;Name (62,70,50)
End-If
End-Program</description>
		<content:encoded><![CDATA[<p>!Below is the code for the brain teaser<br />
! Assumption that i have taken here is that the number of lines per page is 62</p>
<p>Begin-Setup<br />
	no-formfeed<br />
End-Setup</p>
<p>Begin-Program<br />
lET #I=1<br />
Begin-Select<br />
EMPLID<br />
NAME<br />
	IF MOD(#I, 59) = 1<br />
		IF #I = 1<br />
		Print &amp;Name (+1,70)<br />
		ELSE<br />
		Print &amp;Name (+1,70)<br />
		END-IF<br />
	eND-IF	</p>
<p>	Print &amp;EMPLID (+1,1,20)<br />
	Print &amp;NAME   (,24,30)</p>
<p>	IF MOD(#I, 59) = 0<br />
		Print &amp;Name (+1,70)<br />
	eND-IF	</p>
<p>	LET #I = #I +1</p>
<p>From PS_PERSONAL_DATA<br />
where rownum &lt;200<br />
order by EMPLID<br />
End-Select<br />
If mod(#I &#8211; 1,59)  0<br />
	Print &amp;Name (62,70,50)<br />
End-If<br />
End-Program</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: administrator</title>
		<link>http://peoplesoftsqr.com/index.php/2009/02/load-lookup-love-letter-introduction/comment-page-1/#comment-200</link>
		<dc:creator>administrator</dc:creator>
		<pubDate>Mon, 23 Mar 2009 17:25:59 +0000</pubDate>
		<guid isPermaLink="false">http://peoplesoftsqr.com/?p=200#comment-200</guid>
		<description>Definitely.  Use code like this:

&lt;code&gt;table = &#039;PS_EMPLOYEES E, PS_DEPT_TBL D&#039;
where = &#039;D.DEPTID = E.DEPTID&#039;&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Definitely.  Use code like this:</p>
<p><code>table = 'PS_EMPLOYEES E, PS_DEPT_TBL D'<br />
where = 'D.DEPTID = E.DEPTID'</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Petro Philip</title>
		<link>http://peoplesoftsqr.com/index.php/2009/02/load-lookup-love-letter-introduction/comment-page-1/#comment-197</link>
		<dc:creator>Petro Philip</dc:creator>
		<pubDate>Mon, 23 Mar 2009 15:11:19 +0000</pubDate>
		<guid isPermaLink="false">http://peoplesoftsqr.com/?p=200#comment-197</guid>
		<description>Is it possible to join 2 tables in the &#039;TABLE=&#039;  clause? (Without using a view?)</description>
		<content:encoded><![CDATA[<p>Is it possible to join 2 tables in the &#8216;TABLE=&#8217;  clause? (Without using a view?)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
