mirror of
https://github.com/t8y2/dbx.git
synced 2026-10-29 08:11:06 +00:00
SQL Server treats `;` as a statement terminator, not a batch separator. The previous logic split multi-statement SQL by `;` and executed each independently, breaking variable/CTE scope across statements. Send the entire SQL as a single batch via `simple_query` so DECLARE, SET, and CTE definitions remain visible to subsequent statements. Split only on the `GO` client directive when present.