Wednesday, May 26, 2010

Create temp tables with dynamic sql

Recently i had to create some temp tables in some stored procedure just to make sure i could process a lot of inserts within 1 set (from the temp table) from another stored procedure.
as always i ran into the problems regarding scoping.... a temp table which is created with only with one # character in front is only known in it's current session.. a temp table created with ## is server wide accessible.

No comments:

Post a Comment