There is no "the working trick".
As soon as you want to be dynamic about the structure of your statement, and that includes which objects are involved, you need to use dynamic SQL.
I'm not too sure about a sensible design that would entail flexible assigned sequences, but if you do it, you've got to do it with EXEC or EXEC IMMEDIATE.
- Lars