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: Today @ 9:51 AM
Points: 3,231, Visits: 64,359
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


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Yesterday @ 10:25 AM
Points: 18,754, Visits: 12,337
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 2008


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: Thursday, May 02, 2013 3:45 PM
Points: 3,748, Visits: 928
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


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: Yesterday @ 2:20 PM
Points: 3,462, Visits: 2,539
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


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Yesterday @ 10:59 AM
Points: 2,579, Visits: 1,537
Nice question to end the week on. Thanks!
Post #1326190
Posted Friday, July 06, 2012 11:50 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Thursday, January 17, 2013 2:34 PM
Points: 565, Visits: 360
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: 2 days ago @ 9:12 AM
Points: 6,370, Visits: 8,235
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: Yesterday @ 2:05 AM
Points: 1,103, Visits: 1,200
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: Yesterday @ 2:05 AM
Points: 1,103, Visits: 1,200
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: Yesterday @ 2:05 AM
Points: 1,103, Visits: 1,200
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