Fix" Commands of sync" errors in SQL connector

We had a6b588e7 but this was only solving the case of a trailing ;

See merge request !1710
5 jobs for for_testrunner_2
in 0 seconds, using 0 compute credits, and was queued for 0 seconds