<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wikidot="http://www.wikidot.com/rss-namespace">

	<channel>
		<title>Use of %p(1)</title>
		<link>http://peoplesoft.wikidot.com/forum/t-129709/use-of-p-1</link>
		<description>Posts in the discussion thread &quot;Use of %p(1)&quot; - Can you explain how to use the %p parameter within PeopleSoft?</description>
				<copyright></copyright>
		<lastBuildDate>Tue, 18 Aug 2026 10:39:25 +0000</lastBuildDate>
		
					<item>
				<guid>http://peoplesoft.wikidot.com/forum/t-129709#post-383606</guid>
				<title>Re: Use of %p(1)</title>
				<link>http://peoplesoft.wikidot.com/forum/t-129709/use-of-p-1#post-383606</link>
				<description></description>
				<pubDate>Thu, 12 Feb 2009 23:07:13 +0000</pubDate>
				<wikidot:authorName>darko_dj</wikidot:authorName>				<wikidot:authorUserId>115872</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>%SQL is used as a SQL construct - SQL block of a SQL statement. Basically, building blocks of SQL statements, like common where clauses, common selects used within the IN clause, etc</p> <p>Simple example:</p> <p>(SELECT 'X' FROM PS_STDNT_ENRL WHERE EMPLID = %P(1)) - saved as <strong>ENROLMENT_ROW_EXISTS</strong> SQL definition.</p> <p>This SQL definition can now be used when building other SQL definition and SQL statements. For example, in PeopleCode:</p> <p>SQLExec(&quot;SELECT FIRST_NAME FROM PS_PERSON_NAME WHERE EMPLID IN <strong>%SQL(ENROLMENT_ROW_EXISTS, :1)</strong>&quot;,PERSON.EMPLID, &amp;FIRST_NAME)</p> <p>Hope this helps!</p> 
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://peoplesoft.wikidot.com/forum/t-129709#post-382552</guid>
				<title>Use of %p(1)</title>
				<link>http://peoplesoft.wikidot.com/forum/t-129709/use-of-p-1#post-382552</link>
				<description></description>
				<pubDate>Wed, 11 Feb 2009 22:06:01 +0000</pubDate>
				<wikidot:authorName>PSQuery</wikidot:authorName>				<wikidot:authorUserId>282406</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>Hi,</p> <p>I am trying to use the %p(n) functionality in SQL objects from within a PeopleCode program.</p> <p>Can you give some examples of how this is used please and how I might be able to use it to dynamically construct the SQL statement conditionally?</p> <p>I specifically wanted to see if I could use this to pass different clauses to a SQL object, e.g.</p> <p>SELECT * FROM PS_RECA A<br /> WHERE A.STATUS = 'A'<br /> AND %SQL(%P(1))</p> <p>Where %P1 can be replaced with something like A.EMPLID IN (SELECT B.EMPLID FROM PS_RECB B).</p> <p>Any help appreciated.</p> 
				 	]]>
				</content:encoded>							</item>
				</channel>
</rss>