Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 4729

How can I include if statements in this code?

$
0
0

select

SiteID,Name,ProgramID,POSSession,POSSessSummDate,PMealsSumm,RMealsSumm,FMealsSumm,FreeCount,


             

ReducedCount,PaidCount,ErrorCode='Claim Exceeds Eligibility',ReportName='Edit Check',MealType=' ',ItemID=' '


   

fromEDIT_CHECK_V1


     

where(FMealsSumm>FreeCountorrMealsSumm>ReducedCountorPMealsSumm>PaidCount)

     

and


     

IFFMealsSumm>FreeCount


ErrorCode='Free Claim Exceeds Eligibility'


ELSE


IFrMealsSumm>ReducedCount


ErrorCode='Reduced Claim Exceeds Eligibility'


ELSE


ErrorCode='Paid Claim Exceeds Eligibility'


Viewing all articles
Browse latest Browse all 4729

Trending Articles