You can't use separate setQuery() calls to run twice. The second call overwrites the first before the execute() is called.
You could try adding it all in a single Query with a semicolon separating.
The other option would be to use the "Execute Query" server behavior in the Data Management section to run the SET statement before the Recordset code runs.