<?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"
	>
<channel>
	<title>Comments on: how to capture cases in store procedure codes</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/how-to-capture-cases-in-store-procedure-codes/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/how-to-capture-cases-in-store-procedure-codes/</link>
	<description></description>
	<pubDate>Sat, 28 Nov 2009 17:24:22 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
		<item>
		<title>By: Twlp123</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/how-to-capture-cases-in-store-procedure-codes/#comment-62424</link>
		<dc:creator>Twlp123</dc:creator>
		<pubDate>Sat, 18 Apr 2009 00:51:10 +0000</pubDate>
		<guid isPermaLink="false">#comment-62424</guid>
		<description>and I agree with carlosdl remarks that it seems you have a major flaw in your database design and it could be re-designed in such a way to enable a smaller and faster procedure to process the report and achive the desired result.</description>
		<content:encoded><![CDATA[<p>and I agree with carlosdl remarks that it seems you have a major flaw in your database design and it could be re-designed in such a way to enable a smaller and faster procedure to process the report and achive the desired result.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carlosdl</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/how-to-capture-cases-in-store-procedure-codes/#comment-62389</link>
		<dc:creator>Carlosdl</dc:creator>
		<pubDate>Fri, 17 Apr 2009 13:50:09 +0000</pubDate>
		<guid isPermaLink="false">#comment-62389</guid>
		<description>Yes, I think that the query should be split in parts too, and each part should be tested separately, to make sure it does what it is supposed to do, before adding it to the complete statement.</description>
		<content:encoded><![CDATA[<p>Yes, I think that the query should be split in parts too, and each part should be tested separately, to make sure it does what it is supposed to do, before adding it to the complete statement.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Twlp123</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/how-to-capture-cases-in-store-procedure-codes/#comment-62368</link>
		<dc:creator>Twlp123</dc:creator>
		<pubDate>Fri, 17 Apr 2009 04:59:20 +0000</pubDate>
		<guid isPermaLink="false">#comment-62368</guid>
		<description>Its hard to understand your question, but I'm only looking at your case function. The basic syntax of the search case function would be:-

Cae
         WHEN Boolean _expression THEN result_expression
                       [...n]
         [
                       ELSE else_result_expression
         ]
END

Example

Select Leasevendor, LeaseNumber,
CASE --some vendors have id of sales reps incorporated in LeaseNumbers
           When LeaseVendor = 'Trigon PS' Then Substring(LeaseNumber,5,12)
           When LeaseVendor Like 'BB%' Then SubString(LeaseNumber,9,8)
           When LeaseVendor Like 'MMEX%' Then SubString(LeaseNumber,7,6)
           When LeaseVendor = 'DAFS' Then SubString(LeaseNumber,8,11)
           Else 'UnKnown'
END [LeaseAgent], ContractDate [ContractDate]
from Lease



as per your case syntax, since you are repeating the case function for each office name values, then you must include DDS after each end statement of each case function, as in my example above

I'm not sure whether yiour CASE example will work but you must test it out separately with some dummy data first</description>
		<content:encoded><![CDATA[<p>Its hard to understand your question, but I&#8217;m only looking at your case function. The basic syntax of the search case function would be:-</p>
<p>Cae<br />
         WHEN Boolean _expression THEN result_expression<br />
                       [...n]<br />
         [<br />
                       ELSE else_result_expression<br />
         ]<br />
END</p>
<p>Example</p>
<p>Select Leasevendor, LeaseNumber,<br />
CASE &#8211;some vendors have id of sales reps incorporated in LeaseNumbers<br />
           When LeaseVendor = &#8216;Trigon PS&#8217; Then Substring(LeaseNumber,5,12)<br />
           When LeaseVendor Like &#8216;BB%&#8217; Then SubString(LeaseNumber,9,8)<br />
           When LeaseVendor Like &#8216;MMEX%&#8217; Then SubString(LeaseNumber,7,6)<br />
           When LeaseVendor = &#8216;DAFS&#8217; Then SubString(LeaseNumber,8,11)<br />
           Else &#8216;UnKnown&#8217;<br />
END [LeaseAgent], ContractDate [ContractDate]<br />
from Lease</p>
<p>as per your case syntax, since you are repeating the case function for each office name values, then you must include DDS after each end statement of each case function, as in my example above</p>
<p>I&#8217;m not sure whether yiour CASE example will work but you must test it out separately with some dummy data first</p>
]]></content:encoded>
	</item>
</channel>
</rss>
<!-- dynamic -->