Bugs item #600871, was opened at 2002-08-27 18:53
Message generated for change (Comment added) made by drieseng
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=474851&aid=600871&group_id=54790

Category: None
Group: None
>Status: Closed
>Resolution: Invalid
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
>Assigned to: Gert Driesen (drieseng)
Summary: SQL Taks - GO statement causes errors

Initial Comment:
If I have the following SQL statements in a file:

-- Fix user accounts after database restore
EXEC sp_configure 'allow updates', 1
RECONFIGURE WITH OVERRIDE
go

CREATE TABLE #syslogins (
        sid varbinary (85)  NULL ,
        name sysname COLLATE database_default 
NULL 
)

INSERT #syslogins
SELECT sid, name from master..sysxlogins

UPDATE su
SET sid = sl.sid
FROM #syslogins sl JOIN sysusers su ON sl.name = 
su.name
WHERE sl.sid != su.sid

DROP TABLE #syslogins

EXEC sp_configure 'allow updates', 0
RECONFIGURE WITH OVERRIDE
go

and execute it will the SQL task:

BUILD FAILED
SQL Resulted in Exception: Line 17: Incorrect syntax 
near 'go'.
Line 3: Incorrect syntax near 'go'.
Try 'nant -help' for more information

To correct this I have to remove the GO statements, but 
I don't feel that I should have to remove the GO 
statements in my SQL

Jason

----------------------------------------------------------------------

>Comment By: Gert Driesen (drieseng)
Date: 2004-10-24 15:04

Message:
Logged In: YES 
user_id=707851

You should configure the <sql> task to use "GO" as a delimiter.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=474851&aid=600871&group_id=54790


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
NAntContrib-Developer mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nantcontrib-developer

Reply via email to