Using Prompts in Case Expressions

From TekiWiki

Jump to: navigation, search

This whole wiki has now moved to http://www.springboardsolutions.com/wiki

Go to this page Using Prompts in Case Expressions

 
Line 1: Line 1:
-
=== PS Query Issue using a Prompt in Case Expression at PeopleTools 8.49 ===
+
== [[PeopleSoft Query]] ==
 +
===Issue using a Prompt in Case Expression at [[PeopleTools]] 8.49 ===
(ED: Does this happen on other PeopleTools versions?)
(ED: Does this happen on other PeopleTools versions?)
-
The following case statement in PS Query would not give a correct value:
+
The following case statement in [[PeopleSoft Query]] would not give a correct value:
<pre>
<pre>
case  
case  
-
     when deptid like :1 then fte
+
     when DEPTID like :1 then FTE
else
else
     0
     0
Line 17: Line 18:
<pre>
<pre>
case  
case  
-
     when deptid like rtrim(:1,' ') then fte
+
     when DEPTID like rtrim(:1) then FTE
else
else
     0
     0
Line 23: Line 24:
</pre>
</pre>
-
In SQL Server, trim(:1) would resolve the issue (provided there were no leading spaces).
+
In SQL Server, rtrim(:1,' ') would resolve the issue (provided there were no leading spaces).
-
Incidentally, the SQL View would show the following:
+
==More About Functions==
-
<pre>
+
{| class="wikitable"
-
case
+
|-
-
    when deptid like ':1' then fte
+
|[[File:UsingFunctionsInPeopleSoftQuerySmall.jpg|90px|link=http://www.amazon.co.uk/gp/product/B013ZRND0I/ref=as_li_tl?ie=UTF8&camp=1634&creative=6738&creativeASIN=B013ZRND0I&linkCode=as2&tag=springboardso-21]]
-
else
+
 
-
    0
+
|For more information about functions in [[PeopleSoft Query]] and some other interesting stuff too, read our eBook:
-
end
+
 
-
</pre>
+
[http://www.amazon.co.uk/gp/product/B013ZRND0I/ref=as_li_tl?ie=UTF8&camp=1634&creative=6738&creativeASIN=B013ZRND0I&linkCode=as2&tag=springboardso-21 Using Functions in PeopleSoft Query]
 +
 
 +
|}

Latest revision as of 19:23, 24 November 2015

Personal tools