Command sql is limited to queries with a maximum size of 16KB. It should work with queries with more than 40KB (unlimited!?).
Just work with more than 16KB.
We are not able to execute queries we need to execute. There is no workaround available right now.