IN MY WHERE CLAUSE, I NEED TO DETERMINE THE FOLLOWING:
(((WHERE
gl.CashierDate >= @BeginDate AND
gl.CashierDate < DateAdd(d, 1, @EndDate) AND
IF THE ACCOUNTNUMBER IS '22030000' THEN I NEED TO EXCLUDE THESE TWO DISBURSEMENTCODE ('670','670A')
IF THE ACCOUNTNUMBER IS '20350000' THEN I NEED TO EXCLUDE THESE FOUR DISBURSEMENTCODE ('215','215B','305','305A')
IF THE ACCOUNTNUMBER IS ANYTHING BUT THESE TWO ACCOUNTS, THEN I DONT NEED TO EXCLUDE ANYTHING
Thank you for your help!
I WANT TO USE CASE STATEMENT FOR THIS BUT NOT CERTAIN HOW TO DO IT.