Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2008
»
SQL Server 2008 - General
»
Error on this code "GO WAITFOR DELAY...
Error on this code "GO WAITFOR DELAY '00:00:05'"
Rate Topic
Display Mode
Topic Options
Author
Message
malik_nagel
malik_nagel
Posted Tuesday, November 23, 2010 3:13 PM
Forum Newbie
Group: General Forum Members
Last Login: Saturday, March 26, 2011 10:52 PM
Points: 6,
Visits: 32
I want to run a "GO" and then pause for 5 seconds. When I run this code I get "A fatal scripting error occurred.
Incorrect syntax was encountered while parsing GO" Does anyone know why this and how I can run a pause after a GO?
These two statements run fine when they are separate.
Thanks!
Post #1025526
Michael Valentine Jones
Michael Valentine Jones
Posted Tuesday, November 23, 2010 3:20 PM
SSCrazy
Group: General Forum Members
Last Login: Yesterday @ 10:43 AM
Points: 2,945,
Visits: 10,517
"GO" is not a SQL Statement, so you should just remove it.
GO is a batch separator for some clients.
Post #1025530
Evil Kraig F
Evil Kraig F
Posted Tuesday, November 23, 2010 6:47 PM
SSCertifiable
Group: General Forum Members
Last Login: Today @ 12:05 AM
Points: 5,688,
Visits: 6,142
malik_nagel (11/23/2010)
I want to run a "GO" and then pause for 5 seconds. When I run this code I get "A fatal scripting error occurred.
Incorrect syntax was encountered while parsing GO" Does anyone know why this and how I can run a pause after a GO?
These two statements run fine when they are separate.
Thanks!
As Michael mentioned above, it's a batch separator in SQL. Go 50 also loops the previous batch 50 times. THus, it doesn't like WAITFOR.
Best way is, if looping, start your batch with your waitfor, or just put it after the GO.
- Craig Farrell
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions
|
Forum Netiquette
For index/tuning help, follow these directions.
|
Tally Tables
Twitter: @AnyWayDBA
Post #1025613
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.