Mahmoud Al Saadi offers a suggestion for Reconcile Check books to General Ledger – SQL Script.
Dynamics GP Essentials: Reconcile Check books to General Ledger – SQL Script
General Ledger & FinancialsSQL & DataDevelopment & Integration
Archived post from 2014. Dynamics GP and the links it points to have changed since; check current documentation before relying on version-specific steps.