SQL Server Temp Tables across multiple scripts/tabs -
i read quote zed shaw once said "if software developer writes same code more once, should write function doesn't have repeat himself".
on daily basis, find myself making temp tables in sql server
more once per day. don't need these tables live past midnight each day why chose use temp table. however, have various scripts in different tabs in sql management studio
- have repeat these temp tables in every 1 of scripts in order reference it, , seems quite inefficient. ultimate goal run stored procedure populate multiple temp tables , have them available run analyses.
is there better way reference tables current usage? there way reference temp tables across sessions in sql server 2008
?
it seems want global temporary tables. syntax use them same normal temporary tables, have 2 ##
instead of 1 (##temptable
). please take @ link first know limitations of them.
Comments
Post a Comment