https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42418 --- Comment #30 from Kyle M Hall (khall) <kyle@bywatersolutions.com> --- INSERT INTO checkins (item_id, user_id, library_id, timestamp, checkout_id) SELECT oi.itemnumber, oi.issuer_id, COALESCE(oi.checkin_library, oi.branchcode), oi.returndate, oi.issue_id FROM old_issues oi WHERE oi.returndate IS NOT NULL AND oi.itemnumber IS NOT NULL Can fail because check_library and branchcode are both allowed to be null. May add an "AND ( oi.checkin_library IS NOT NULL OR oi.branchcode IS NOT NULL )"? -- You are receiving this mail because: You are watching all bug changes.