I'm sure the likely answer will be "Use dynamic SQL" but I'm hopeful that there is a more elegant solution.
Within a stored procedure, I'd like to:
1) Create a new table
-- and then
2) Insert records into this same table
-- and lastly
3) Update certain values in this same table.
When SQL compiles my sproc, it tells me that my column names are invalid - because, well, I've got insert and update statements which reference a table that has not been created yet.
What, in your opinion, is the most simple and direct way to accomplish this task?