Greetings again mates,
This is one of the simplest, yet one of the weirdest issues I have had to deal with.
I am still working on someone else's work.
When records are created and stored in the db, an extra row or two with zero records are stored.
Please see attached screenshot.
The problem is that most of the time, 2 or 3 rows have values either in the check AMount column or Cash column. The remaining 2 or so rows have 0 values.
We would like to show only the rows with data.
The screenshot shows only 3 rows have data 2 in check column and 1 row in cash column. The remaining rows have zeros (0).
The code below doesn't work because it either shows 1 row or blank rows.
Any help is of course appreciated.
SELECT employee_ded_amts.ID, employee_ded_amts.employee_ID, employee_ded_amts.charity_code, employee_ded_amts.chcknum, employee_ded_amts.check_amt,
employee_ded_amts.one_time, employee_ded_amts.bi_weekly, employee_ded_amts.cash, employee_ded_amts.donate_choice,
employee_ded_amts.date_stamp, employee_ded_amts.amb_approved, active_empl.dept_code, active_empl.empl_first, active_empl.empl_last
FROM employee_ded_amts INNER JOIN active_empl ON employee_ded_amts.employee_ID = active_empl.employee_id
WHERE ((cash <> 0 and employee_ded_amts.check_amt <> 0) AND employee_ded_amts.employee_id = '00088899999' ORDER BY employee_ded_amts.employee_ID