Link to home
Start Free TrialLog in
Avatar of sqlcurious
sqlcuriousFlag for United States of America

asked on

need to modify a select statement

Hi experts,
I need to modify the following case statement:
CASE WHEN AVG(I.Invoice_Amt)>MAX(cust.Approval_Limit)  THEN 0.75*(MAX(I.Invoice_Amt)) ELSE MAX(cust.Approval_Limit) END AS RecApprovalLimit

At THEN 0.75*(MAX(I.Invoice_Amt)) - I should also make sure 0.75*(MAX(I.Invoice_Amt))  doesnot exceed 50000, how do I incorporate the logic here, pls help
ASKER CERTIFIED SOLUTION
Avatar of SANDY_SK
SANDY_SK
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sqlcurious

ASKER

thanks