https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24483
--- Comment #2 from Andrew Fuerste-Henry <[email protected]> --- In the meantime, I wrote a report to tell you who isn't going to get deleted: SELECT cardnumber, surname, firstname, if(sum(amountoutstanding)=0,null,sum(amountoutstanding)) as account_balance, if(count(issues.issue_id)=0,null,count(issues.issue_id)) as current_checkouts, guarantees, if(category_type='S','Staff',null) as is_staff FROM borrowers left join accountlines using (borrowernumber) left join issues using (borrowernumber) left join categories using (categorycode) left join (SELECT guarantorid, group_concat(concat(firstname,' ',surname,' ',cardnumber)) as guarantees from borrowers where guarantorid is not null group by guarantorid) g on (borrowers.borrowernumber=g.guarantorid) WHERE [plug in how you're defining your deletion -- could be categorycode, patron list, etc] GROUP BY borrowernumber HAVING account_balance is not null OR current_checkouts is not null OR guarantees is not null OR is_staff is not null -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
