Victoria has posted a new SQL view for all GL transactions in Dynamics GP. This view includes unposted transactions as well.
SQL view for all GL transactions in Dynamics GP | Victoria Yudin
Archived post from 2011. Dynamics GP and the links it points to have changed since; check current documentation before relying on version-specific steps.