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 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 23: Line 23:
</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:
Incidentally, the SQL View would show the following:

Revision as of 15:22, 11 August 2013

Personal tools