SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


What is the result ? (SQLServer 2005)


What is the result ? (SQLServer 2005)

Author
Message
BarbW
BarbW
Hall of Fame
Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)

Group: General Forum Members
Points: 3147 Visits: 1130
I did the same thing, edited the single line to two lines and it worked in QA. I was wondering if anyone had ideas on how this feature (GO 10) could be used...any thoughts?
Pires-502779
Pires-502779
SSC Journeyman
SSC Journeyman (84 reputation)SSC Journeyman (84 reputation)SSC Journeyman (84 reputation)SSC Journeyman (84 reputation)SSC Journeyman (84 reputation)SSC Journeyman (84 reputation)SSC Journeyman (84 reputation)SSC Journeyman (84 reputation)

Group: General Forum Members
Points: 84 Visits: 55
imagine you need to generate 100 random numbers?

You can hit F5 100 times or use go 100.
ALZDBA
ALZDBA
SSChampion
SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)

Group: General Forum Members
Points: 12328 Visits: 8928
barb.wendling (9/10/2008)
I did the same thing, edited the single line to two lines and it worked in QA. I was wondering if anyone had ideas on how this feature (GO 10) could be used...any thoughts?


Use SSMS if you want this to work !! (Not query analyser !)

e.g. for test purposes

create table mytable (id int not null identity(1,1) primary key,
col2 varchar(150) not null ,
col3 datetime not null default getdate() )
go
/* Fill table with 15000 rows */
insert into mytable (col2) values ('Initial load');
go 15000




Johan


Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere w00t

- How to post Performance Problems
- How to post data/code to get the best help


- How to prevent a sore throat after hours of presenting ppt ?


press F1 for solution, press shift+F1 for urgent solution :-D


Need a bit of Powershell? How about this

Who am I ? Sometimes this is me Alien but most of the time this is me Hehe
Ian Scarlett
Ian Scarlett
SSCrazy
SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)

Group: General Forum Members
Points: 2235 Visits: 6891
e.g. for test purposes
create table mytable (id int not null identity(1,1) primary key,
col2 varchar(150) not null ,
col3 datetime not null default getdate() )
go
/* Fill table with 15000 rows */
insert into mytable (col2) values ('Initial load');
go 15000


Careful ALZDBA, you'll have the RBAR police after you for suggesting something like that.Wink



Andrew Watson-478275
Andrew Watson-478275
SSCommitted
SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)

Group: General Forum Members
Points: 1763 Visits: 2704
Boo hoo Crying - I got it wrong because my local copy of BOL (SQL 2005) doesn't have the (count) syntax in it.
john.arnott
john.arnott
SSCommitted
SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)

Group: General Forum Members
Points: 1992 Visits: 3059
The category for this QOD is a bit misleading. It's not strictly a Transact-SQL feature that's being highlighted here. T-SQL syntax takes care of interpreting the two single-quote marks as a literal to be included in the print result, but the "GO" statement is interpreted and executed by SQL Server Management Studio (SSMS). The multiple execution option is only available there, and would not work outside that environment. SQL 2000 Query Analyzer uses "GO" to terminate batches as well, but doesn't have the optional parameter.

There was a discussion of this point from a couple of weeks ago when the QOD for 25 August was "Go Go Go".
Ian Elliott
Ian Elliott
SSC Veteran
SSC Veteran (267 reputation)SSC Veteran (267 reputation)SSC Veteran (267 reputation)SSC Veteran (267 reputation)SSC Veteran (267 reputation)SSC Veteran (267 reputation)SSC Veteran (267 reputation)SSC Veteran (267 reputation)

Group: General Forum Members
Points: 267 Visits: 971
So because I got the question wrong, because like many I checked my answer in QA before I chose it, and the question did not specifically mention the version of SQL Server nor where the query should be run, should I not get the point anyway? BigGrin
Pires-502779
Pires-502779
SSC Journeyman
SSC Journeyman (84 reputation)SSC Journeyman (84 reputation)SSC Journeyman (84 reputation)SSC Journeyman (84 reputation)SSC Journeyman (84 reputation)SSC Journeyman (84 reputation)SSC Journeyman (84 reputation)SSC Journeyman (84 reputation)

Group: General Forum Members
Points: 84 Visits: 55
Ian Elliott (9/10/2008)
So because I got the question wrong, because like many I checked my answer in QA before I chose it, and the question did not specifically mention the version of SQL Server nor where the query should be run, should I not get the point anyway? BigGrin


Let me correct you... The version of SQL Server was mentioned.

I think this question should worth 10 points because only users runing SSMS, people that like to run the apropriated tools for the right environment, with standard setting, would check the correct option! TongueBigGrin
John Laskey
John Laskey
SSChasing Mays
SSChasing Mays (659 reputation)SSChasing Mays (659 reputation)SSChasing Mays (659 reputation)SSChasing Mays (659 reputation)SSChasing Mays (659 reputation)SSChasing Mays (659 reputation)SSChasing Mays (659 reputation)SSChasing Mays (659 reputation)

Group: General Forum Members
Points: 659 Visits: 238
I to tested the code in QA against SQL 2005 instance and got the following:

Server: Msg 102, Level 15, State 1, Line 2
Incorrect syntax near 'GO'.

Therefore, I choose incorrectly?

I think the question could have been worded better.
Lynn Pettis
Lynn Pettis
SSC-Dedicated
SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)SSC-Dedicated (39K reputation)

Group: General Forum Members
Points: 39864 Visits: 38563
Not really. The question specifically stated SQL Server 2005. The assumption here is that you are using SQL Server 2005 tools, not SQL Server 2000 tools to access SQL Server 2005 database servers.

Cool

Cool
Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search