 




<?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: Defining a sort variable (ORDER by) in RPG SQL</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/defining-a-sort-variable-order-by-in-rpg-sql/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/defining-a-sort-variable-order-by-in-rpg-sql/</link>
	<description></description>
	<lastBuildDate>Tue, 21 May 2013 18:28:49 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: chance</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/defining-a-sort-variable-order-by-in-rpg-sql/#comment-68215</link>
		<dc:creator>chance</dc:creator>
		<pubDate>Mon, 21 Sep 2009 16:51:13 +0000</pubDate>
		<guid isPermaLink="false">#comment-68215</guid>
		<description><![CDATA[BigKat,

Your solution looks good.
1. By doing the sql this way it is not considered dynamic?  There is no need to &quot;prepare&quot;?
2. How can you specify more than 1 sort field?  Such as:
     order by case                                
       when :inSortOption = &#039;1&#039; then PRDNUM, VENDOR
       when :inSortOption = &#039;2&#039; then DEPT, VENDOR
       when :inSortOption = &#039;3&#039; then DIVISION, ITEMNBR
     end
     When I try this, I get &quot;Token , was not valid. Valid tokens: END.&quot;

Thanks, Chance]]></description>
		<content:encoded><![CDATA[<p>BigKat,</p>
<p>Your solution looks good.<br />
1. By doing the sql this way it is not considered dynamic?  There is no need to &#8220;prepare&#8221;?<br />
2. How can you specify more than 1 sort field?  Such as:<br />
     order by case<br />
       when :inSortOption = &#8217;1&#8242; then PRDNUM, VENDOR<br />
       when :inSortOption = &#8217;2&#8242; then DEPT, VENDOR<br />
       when :inSortOption = &#8217;3&#8242; then DIVISION, ITEMNBR<br />
     end<br />
     When I try this, I get &#8220;Token , was not valid. Valid tokens: END.&#8221;</p>
<p>Thanks, Chance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: murrayinfosys</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/defining-a-sort-variable-order-by-in-rpg-sql/#comment-67736</link>
		<dc:creator>murrayinfosys</dc:creator>
		<pubDate>Thu, 03 Sep 2009 16:50:03 +0000</pubDate>
		<guid isPermaLink="false">#comment-67736</guid>
		<description><![CDATA[EXCELLENT!

Was I under a rock when that SQL staetment was made available?
Anybody know when?

Phil]]></description>
		<content:encoded><![CDATA[<p>EXCELLENT!</p>
<p>Was I under a rock when that SQL staetment was made available?<br />
Anybody know when?</p>
<p>Phil</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 3/10 queries in 0.040 seconds using memcached
Object Caching 281/287 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-21 19:36:55 -->