Solved

CASE WHEN NOT 0 then Calculate else dont calculate

Posted on 2012-03-13
2
273 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
Comment Utility
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
Comment Utility
solved oredi
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Help with Search Query in SQL Server 2008R2 Version 26 56
MS SQL Backup 24 69
SQL Server RDS clr assembly 4 34
SQL Date Retrival 7 26
When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
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

743 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now