I have a problem with this statement, I get an error near the keyword in:
CASE [table1.TransType] IN('Accounts Receivable','Customer Sales')THEN table1.Amt
ELSE
CASE WHEN [table1.Billable] IN(0,8,28) THEN table1.Amt
CASE WHEN [table1.Billable] IN(1,2,3,21,22,23)THEN table1.RecAmt
CASE WHEN [table1.Billable] IN(9)THEN 0
END
AS NetBilling
I believe your brackets may have been the problem. You were also missing a
WHENin the first case.This should work: