Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««1234»»»

Execs and temporary tables Expand / Collapse
Author
Message
Posted Friday, July 06, 2012 8:30 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Tuesday, April 15, 2014 12:05 PM
Points: 3,569, Visits: 72,411
Always nice to have an easy one on Friday....





--Mark Tassin
MCITP - SQL Server DBA
Proud member of the Anti-RBAR alliance.
For help with Performance click this link
For tips on how to post your problems
Post #1326125
Posted Friday, July 06, 2012 9:03 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 3:56 PM
Points: 20,466, Visits: 14,099
mtassin (7/6/2012)
Always nice to have an easy one on Friday....



Yes it is.




Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #1326152
Posted Friday, July 06, 2012 9:08 AM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Monday, March 10, 2014 6:02 PM
Points: 3,764, Visits: 1,051
Nice question, thanks for the back to basics.

Happy weekend, everyone.

"El" Jerry.


"El" Jerry.

"A watt of Ottawa" - Gerardo Galvan
Post #1326155
Posted Friday, July 06, 2012 9:12 AM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Today @ 9:20 AM
Points: 4,245, Visits: 3,325
SQLRNNR (7/6/2012)
mtassin (7/6/2012)
Always nice to have an easy one on Friday....



Yes it is.

Count me in.
Post #1326159
Posted Friday, July 06, 2012 9:58 AM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: Wednesday, April 16, 2014 9:46 AM
Points: 3,150, Visits: 1,900
Nice question to end the week on. Thanks!
Post #1326190
Posted Friday, July 06, 2012 11:50 AM
SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Tuesday, March 04, 2014 7:41 PM
Points: 634, Visits: 399
Thanks for the question! but the set of possible answers was "too easy": once I saw that B#2 was going to error out while B#3 was not, I didn't look at the subsequent Bs .
Post #1326248
Posted Friday, July 06, 2012 12:50 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 12:20 PM
Points: 6,545, Visits: 8,763
mtassin (7/6/2012)
Always nice to have an easy one on Friday....



I concur... but what is easy for one person isn't for another.


Wayne
Microsoft Certified Master: SQL Server 2008
If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
Links: For better assistance in answering your questions, How to ask a question, Performance Problems, Common date/time routines,
CROSS-TABS and PIVOT tables Part 1 & Part 2, Using APPLY Part 1 & Part 2, Splitting Delimited Strings
Post #1326288
Posted Saturday, July 07, 2012 7:49 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, April 17, 2014 11:47 PM
Points: 1,298, Visits: 1,306
BrainDonor (7/6/2012)
That explanation requires expanding slightly, because there is more than one type of temporary table.
Local temporary tables (prefixes with '#') go out of scope when the exec command completes. However, use '##' to create a Global temporary table and the table can be accessed outside of the exec statement that created it.

You are right. But with global temporary table this will be no fun.




See, understand, learn, try, use efficient
© Dr.Plch
Post #1326420
Posted Saturday, July 07, 2012 7:51 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, April 17, 2014 11:47 PM
Points: 1,298, Visits: 1,306
Michael Poppers (7/6/2012)
Thanks for the question! but the set of possible answers was "too easy": once I saw that B#2 was going to error out while B#3 was not, I didn't look at the subsequent Bs .

Thanks.
I wanted to have it uniform.




See, understand, learn, try, use efficient
© Dr.Plch
Post #1326421
Posted Saturday, July 07, 2012 7:52 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, April 17, 2014 11:47 PM
Points: 1,298, Visits: 1,306
Thanks to everyone.
Sorry, I missed the beggining of this discussion as I was out of civilization (holiday).




See, understand, learn, try, use efficient
© Dr.Plch
Post #1326422
« Prev Topic | Next Topic »

Add to briefcase ««1234»»»

Permissions Expand / Collapse