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 07, 2012 7:19 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 8:19 AM
Points: 1,986, Visits: 1,612
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 07, 2012 7:26 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 3:44 PM
Points: 11,970, Visits: 10,995
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 07, 2012 8:47 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, April 09, 2014 2:46 AM
Points: 1,371, Visits: 1,547
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 07, 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: Today @ 11:53 AM
Points: 3,436, Visits: 1,683
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 07, 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: Today @ 12:10 PM
Points: 3,766, Visits: 3,584
Good question. I always forget that you can do that.
Post #1356031
Posted Friday, September 07, 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: Monday, March 10, 2014 6:02 PM
Points: 3,764, Visits: 1,051
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
Post #1356037
Posted Friday, September 07, 2012 9:20 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 6:09 AM
Points: 1,622, Visits: 2,032
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 07, 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 @ 5:12 PM
Points: 20,458, Visits: 14,081
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 07, 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 @ 9:46 AM
Points: 3,150, Visits: 1,900
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 07, 2012 12:29 PM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Monday, March 31, 2014 3:08 PM
Points: 1,906, Visits: 10,941
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