I have a SQL query in Access as follows:
SELECT pu_balance_hist.account_no, pu_balance_hist.occupant_code, pu_balance_hist.trans_date, pu_balance_hist.jour_code, pu_balance_hist.trans_amt, pu_balance_hist.desc_code
FROM Northstar_live.harris_live.pu_balance_hist pu_balance_hist
WHERE (pu_balance_hist.trans_date>={ts '2013-01-01 00:00:00'}) AND (pu_balance_hist.jour_code='CR')
ORDER BY pu_balance_hist.trans_date
I need to include a column in Access that will give me the following information to include in the above SQL statement:
If pu_balance_hist.desc_code = "140","Cash"
= "141","Check"
= "1", "Money Order Payment"
= "50","Cross Applied Payment"
= "75","Wire Transfer Payment"
= "142","Debit"
= "144',"Web Credit Card Payment"
= "160", "Return Check"
= "161", "NSF Check"
= "162", "NSF Check Charge"
= "164", "Balance Transfer
SELECT pu_balance_hist.account_no, pu_balance_hist.occupant_code, pu_balance_hist.trans_date, pu_balance_hist.jour_code, pu_balance_hist.trans_amt, pu_balance_hist.desc_code
FROM Northstar_live.harris_live.pu_balance_hist pu_balance_hist
WHERE (pu_balance_hist.trans_date>={ts '2013-01-01 00:00:00'}) AND (pu_balance_hist.jour_code='CR')
ORDER BY pu_balance_hist.trans_date
I need to include a column in Access that will give me the following information to include in the above SQL statement:
If pu_balance_hist.desc_code = "140","Cash"
= "141","Check"
= "1", "Money Order Payment"
= "50","Cross Applied Payment"
= "75","Wire Transfer Payment"
= "142","Debit"
= "144',"Web Credit Card Payment"
= "160", "Return Check"
= "161", "NSF Check"
= "162", "NSF Check Charge"
= "164", "Balance Transfer