AFAIR, you should end the second DECLARE statement with a semi-colon (;). The same applies to the second SET statement and, I think, the same would apply to the SELECT statement, thus rendering the GO command useless.
Thanks for that hint. I tried all kinds of combinations I found in Microsoft documentations but unfortunately I could not get it running.
I heard KNIME will update the SQL nodes in one of the next releases, so maybe it will be supported in the future. Not a big deal for us now but would be nice to have.