Tech
Forums
Jobs
Books
Events
Videos
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
6
Answers
CASE WHEN problem
A Repasky
11y
1k
1
Reply
I get an error on the last "as" after the "end" in the statement. I am not sure what I did wrong. Can anyone help with this.
My boss said I would not get it.
Thanks for the help ahead of time.
arep
CASE
WHEN
ClaimsDetail
.
AllowedAmt
=
ClaimsDetail
.
NotCoveredAmt
and
ClaimsDetail
.
NotCoveredAmt
!=
0
then
'Denied'
else
CASE
WHEN
ClaimsDetail
.
NetAmt
!=
0
or
ClaimsDetail
.
CopayAmt
!=
0
or
ClaimsDetail
.
DeductAmt
!=
0
or
(
ClaimsDetail
.
OICPaidAmount
!=
0
and
ClaimsDetail
.
AllowedAmt
!=
ClaimsDetail
.
NotCoveredAmt
)
then
'Paid'
else
CASE
WHEN
ClaimsDetail
.
AllowedAmt
=
ClaimsDetail
.
NotCoveredAmt
and
ClaimsDetail
.
NotCoveredAmt
!=
0
then
'Denied'
else
CASE
WHEN
ClaimsDetail
.
NetAmt
!=
0
or
ClaimsDetail
.
CopayAmt
!=
0
or
ClaimsDetail
.
DeductAmt
!=
0
or
(
ClaimsDetail
.
AllowedAmt
!=
0
and
ClaimsDetail
.
AllowedAmt
!=
ClaimsDetail
.
NotCoveredAmt
)
or
(
ClaimsDetail
.
OICPaidAmount
!=
0
and
ClaimsDetail
.
NotCoveredAmt
=
0
)
then
'Paid'
end
as
ClaimStatus
,
Post
Reset
Cancel
Answers (
6
)
Next Recommended Forum
What is the best site to learn sqlserver with practice Examp
How to get comma separated value..?