Monday, August 12, 2013

[SQL 2012] #Temptables, scope and SP_Execute

[SQL 2012] #Temptables, scope and SP_Execute


#Temptables, scope and SP_Execute

Posted: 12 Aug 2013 01:16 AM PDT

Hi there,I want to modify an SP to use #temp tables, as its very slow at the moment, but I have an issue. The queries I use to generate the contents of these temptables are dynamic, so I have to use sp_executeSQL to run them, and this means the temp tables are generated out of scope. Most people recommend creating your #temptable in the parent script and populating it inside the sp_executeSQL, but the issue I have is I don't know how many #temptables I'm going to need, so I need to be able to create them dynamically, and the only way I know how to do this is with sp_executeSQLI can't use ##temptables, as this SP might be run by more than one user at once.Is there any way I can make sp_executeSQL share scope with its parent script?Any help is very welcome

Excel 2013 for BI

Posted: 12 Aug 2013 12:14 AM PDT

Just wondering, it looks like Excel 2013 is going to be really cool for BI... especially stuff like GeoFlow etc for doing sort of "time lapse" sales analysis. Is it just me, or is it a significant upgrade from 2010?If it is, what are your favorite new features? I saw Kate & Emil's video on Geoflow, and it was seriously awesome. Any other really cool goodies in there that I'm missing?thanks!Pieter

No comments:

Post a Comment

Search This Blog