TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
A Repasky
NA
231
183.1k
CASE WHEN problem
Apr 16 2013 9:14 PM
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
,
Reply
Answers (
6
)
What is the best site to learn sqlserver with practice Examp
How to get comma separated value..?