Problem with Temp Tables and nested Sprocs/Transactions - 500 points!
Posted on 2004-09-14
I can't get my temp tables to work today and no-one in my team has a clue either! I have a main SProc which is creating the temp tables which I can then select from in the same SProc (so they are definitely there). I need to use them in another SProc called from the one that created the temp tables (EXEC @status_val=tc_stg_backdated_evts @debug=@debug) and it tells me that the temp tables don't exist. I can select from the main SProc again directly after calling the sub Sproc so what's going on? Happy to provide all SQL if that helps.