David Musgrave has a new Quick Tip: Passing Variables to SQL Server
Quick Tip: Passing Variables to SQL Server – Developing for Dynamics GP
Tips & Hidden FeaturesSQL & DataInstall, Upgrade & Admin
Archived post from 2011. Dynamics GP and the links it points to have changed since; check current documentation before relying on version-specific steps.