Utility method to create a Sql object without empty statements/transactions, and appending semicolons when needed.