Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Register Now and get your question answered!
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 procedure related
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

1 Posts

Posted - 09/26/2012 :  00:19:33  Show Profile  Reply with Quote
SELECT tblplsrptextract1.strSpyIDocType AS SPYDOCTYPE
, SUM(CASE WHEN tblplsrptextract1.strusriproduct = 'APP-NEW' THEN 1 ELSE 0 END) AS APPNEW
, SUM(CASE WHEN tblplsrptextract1.strusriproduct = 'APP-RENEWAL' THEN 1 ELSE 0 END) as APPRENEWAL
FROM tblplsrptextract1

Now we want only
tblplsrptextract1.strusriproduct = 'APP-RENEWAL' to be present as field so that we can take that field in crystal report and take sum there, not in procedure..

Can someone help me on this???

I want to explore

Edited by - Somnath_lnt on 09/26/2012 00:24:07

Very Important crosS Applying yaK Herder

52326 Posts

Posted - 09/26/2012 :  11:52:18  Show Profile  Reply with Quote
so do you mean removing the other sum field?

SQL Server MVP

Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.07 seconds. Powered By: Snitz Forums 2000