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 7: Line 7:
<pre>
<pre>
case  
case  
-
     when deptid like :1 then fte
+
     when DEPTID like :1 then FTE
else
else
     0
     0
Line 17: Line 17:
<pre>
<pre>
case  
case  
-
     when deptid like rtrim(:1) then fte
+
     when DEPTID like rtrim(:1) then FTE
else
else
     0
     0
Line 24: Line 24:
In SQL Server, rtrim(: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:
 
-
 
-
<pre>
 
-
case
 
-
    when deptid like ':1' then fte
 
-
else
 
-
    0
 
-
end
 
-
</pre>
 
==More About Functions==
==More About Functions==

Revision as of 21:33, 25 August 2015

Personal tools