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 «««123

SELECT INTO with a Temp Table Expand / Collapse
Author
Message
Posted Thursday, November 18, 2010 10:17 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Friday, September 5, 2014 2:00 PM
Points: 2,160, Visits: 2,191
Thanks for the question, I too have run into this and now know better.

As for the missing GOs I thought about that being a problem, but since you had each command separated into a separate code block I assumed that wasn't your intent. (Even though the question was "What would be the result returned from the following script?")
Post #1023039
Posted Thursday, November 18, 2010 11:10 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 8:29 AM
Points: 12,965, Visits: 10,738
Nice question and great follow up discussion.



How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1023068
Posted Thursday, November 18, 2010 11:00 PM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Monday, June 30, 2014 2:51 AM
Points: 2,037, Visits: 369
nice question... learned something new today...
Post #1023306
Posted Saturday, November 20, 2010 1:59 PM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Today @ 8:41 AM
Points: 986, Visits: 953
Thanks for the explanation vk-kirov and mtassin.

Regards,
Iulian
Post #1023966
Posted Monday, November 22, 2010 5:29 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Friday, June 27, 2014 2:20 AM
Points: 969, Visits: 691
Good question, thanks for taking the time to help educate the SQL community.

Hope this helps,
Rich



Post #1024250
Posted Monday, November 22, 2010 12:32 PM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Friday, September 19, 2014 8:20 AM
Points: 2,373, Visits: 2,726
This is crazy -- I didn't even think of the problem that happens, since the two table creation statements are in different parts of the IF block. But if that's the way it works, then it is good to know.

Thanks,
webrunner


-------------------
"Operator! Give me the number for 911!" - Homer Simpson

"A SQL query walks into a bar and sees two tables. He walks up to them and says 'Can I join you?'"
Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html
Post #1024592
Posted Tuesday, November 23, 2010 9:49 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 8:26 AM
Points: 2,142, Visits: 1,739
RichardDouglas (11/22/2010)
Good question, thanks for taking the time to help educate the SQL community.


I assure you that it's nearly always the other way around
Post #1025275
Posted Wednesday, November 24, 2010 11:02 AM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Today @ 8:42 AM
Points: 17,637, Visits: 15,489
Thanks for the question.



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 #1026066
Posted Monday, February 27, 2012 10:21 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Wednesday, July 30, 2014 10:52 PM
Points: 483, Visits: 244
Great question on the stored procedure.
Thanks.
Post #1258389
« Prev Topic | Next Topic »

Add to briefcase «««123

Permissions Expand / Collapse