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»»

GO Part 1 Expand / Collapse
Author
Message
Posted Friday, September 7, 2012 7:19 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 3:06 AM
Points: 2,144, Visits: 1,736
I looked at the first option and was disappointed that the second one wasn't
Collect $200 for parsing GO.
Post #1355960
Posted Friday, September 7, 2012 7:26 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 7:44 AM
Points: 13,462, Visits: 12,320
Richard Warr (9/7/2012)
I looked at the first option and was disappointed that the second one wasn't
Collect $200 for parsing GO.


+1

Good question. Made me stop and think before my first cup of coffee.


_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Moden's splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
Post #1355967
Posted Friday, September 7, 2012 8:47 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Tuesday, June 24, 2014 6:38 PM
Points: 1,371, Visits: 1,560
Lucky me...not fallen prey by the trap GO 5

Nice Question though..


~ Lokesh Vij

Guidelines for quicker answers on T-SQL question
Guidelines for answers on Performance questions

Link to my Blog Post --> www.SQLPathy.com

Follow me @Twitter

Post #1356023
Posted Friday, September 7, 2012 8:48 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: 2 days ago @ 7:11 AM
Points: 3,462, Visits: 1,801
Richard Warr (9/7/2012)
I looked at the first option and was disappointed that the second one wasn't
Collect $200 for parsing GO.


I wish I had thought of that when I was writing the question!

FYI the format of the question was actual from some code I've been using recently to load some data for volume testing. GO 18 get's you about half a million rows, GO 20 gets 2 mil +.

Everyone has been real positive on this question so far. Keep your fingers crossed for me on part 2.


Kenneth Fisher
I strive to live in a world where a chicken can cross the road without being questioned about its motives.
--------------------------------------------------------------------------------
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

Link to my Blog Post --> www.SQLStudies.com
Post #1356024
Posted Friday, September 7, 2012 8:53 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, September 2, 2014 8:36 AM
Points: 3,918, Visits: 3,638
Good question. I always forget that you can do that.
Post #1356031
Posted Friday, September 7, 2012 8: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: Today @ 7:54 AM
Points: 3,799, Visits: 1,172
Excellent question, Kenneth.

Almost caught by the 5, thinking it selected 1 row on every iteration.

Keep these kind of questions comin'!!


"El" Jerry.

"A watt of Ottawa" - Gerardo Galvan

To better understand your help request, please follow these best practices.
Post #1356037
Posted Friday, September 7, 2012 9:20 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Yesterday @ 11:33 AM
Points: 1,821, Visits: 2,173
Thanks for the question. Went for six, as I focused on the iterations, without thinking about the select returning the just inserted rows. But, as others have said, this was a good, fun question.

Please don't go. The drones need you. They look up to you.
Connect to me on LinkedIn
Post #1356059
Posted Friday, September 7, 2012 11:10 AM


SSC-Insane

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

Group: General Forum Members
Last Login: Today @ 6:33 AM
Points: 21,753, Visits: 15,450
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 #1356130
Posted Friday, September 7, 2012 11:53 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 @ 12:49 PM
Points: 3,322, Visits: 1,986
Nice question. I have used the GO x syntax a few times so for me it was just counting the numbers up correctly. Looking forward to part 2.
Post #1356154
Posted Friday, September 7, 2012 12:29 PM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Friday, September 12, 2014 11:50 AM
Points: 1,994, Visits: 10,965
Great question. But it was a good thing I'd had my coffee/tea before I tried answering....


Rob Schripsema
Accelitec, Inc
Post #1356179
« Prev Topic | Next Topic »

Add to briefcase «««1234»»

Permissions Expand / Collapse