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

What is the result ? (SQLServer 2005) Expand / Collapse
Author
Message
Posted Wednesday, September 10, 2008 7:36 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Yesterday @ 7:58 AM
Points: 2,530, Visits: 1,030
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?
Post #566882
Posted Wednesday, September 10, 2008 7:44 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Thursday, September 16, 2010 3:52 AM
Points: 78, Visits: 55
imagine you need to generate 100 random numbers?

You can hit F5 100 times or use go 100.
Post #566894
Posted Wednesday, September 10, 2008 7:45 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: 2 days ago @ 12:47 AM
Points: 7,005, Visits: 8,451
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


Don't drive faster than your guardian angel can fly ...
but keeping both feet on the ground won't get you anywhere

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


Need a bit of Powershell? How about this

Who am I ? Sometimes this is me but most of the time this is me
Post #566895
Posted Wednesday, September 10, 2008 8:00 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, July 30, 2014 7:22 AM
Points: 1,327, Visits: 4,506
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.;)



Post #566919
Posted Wednesday, September 10, 2008 8:10 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: 2 days ago @ 10:21 AM
Points: 1,219, Visits: 2,210
Boo hoo - I got it wrong because my local copy of BOL (SQL 2005) doesn't have the (count) syntax in it.
Post #566935
Posted Wednesday, September 10, 2008 10:13 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: 2 days ago @ 8:53 PM
Points: 1,521, Visits: 3,039
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".
Post #567085
Posted Wednesday, September 10, 2008 10:42 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Yesterday @ 10:46 AM
Points: 230, Visits: 807
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? :D
Post #567109
Posted Wednesday, September 10, 2008 11:05 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Thursday, September 16, 2010 3:52 AM
Points: 78, 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? :D


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! :P:D
Post #567120
Posted Wednesday, September 10, 2008 1:29 PM
SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Friday, June 7, 2013 6:57 AM
Points: 642, Visits: 200
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.

Post #567261
Posted Wednesday, September 10, 2008 1:37 PM


SSC-Insane

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

Group: General Forum Members
Last Login: Today @ 12:11 PM
Points: 23,296, Visits: 32,034
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.




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)
Post #567269
« Prev Topic | Next Topic »

Add to briefcase ««1234»»»

Permissions Expand / Collapse