Solved

CASE WHEN NOT 0 then Calculate else dont calculate

Posted on 2012-03-13
2
275 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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

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

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Viewers will learn how the fundamental information of how to create a table.

863 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

21 Experts available now in Live!

Get 1:1 Help Now