Solved

CASE WHEN NOT 0 then Calculate else dont calculate

Posted on 2012-03-13
2
279 Views
Last Modified: 2012-08-13
trying to calculate a Payment_Filter field but some syntax occur,

logic : when tmems.fsrvmembsamt is not 0 then calculate, else dont calculate or set payment filter to 0

(CASE WHEN tmems.fSrvMemBSAmt <> 0 THEN
(tmems.fSrvMemBSAmt - tmems.fSrvMemPacAmt) as Payment_Filter
ELSE
Payment_Filter = 0
END)
0
Comment
Question by:doramail05
  • 2
2 Comments
 
LVL 1

Accepted Solution

by:
doramail05 earned 0 total points
ID: 37718128
got it already

Payment_Filter = (CASE WHEN tmems.fSrvMemBSAmt <> 0 THEN
(tmems.fSrvMemBSAmt - tmems.fSrvMemPacAmt)
ELSE
0
END)
0
 
LVL 1

Author Closing Comment

by:doramail05
ID: 37718146
solved oredi
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question