"Incorrect syntax near 'GO'." exception when using keepFormat = true and 
additionall spaces placed on the same row with GO statement.
-------------------------------------------------------------------------------------------------------------------------------------

                 Key: MSQL-25
                 URL: http://jira.codehaus.org/browse/MSQL-25
             Project: Maven 2.x SQL Plugin
          Issue Type: Bug
    Affects Versions: 1.1
         Environment: SQL Server  2008 (2005)
            Reporter: Leonid Mendelev
            Priority: Minor


Script from file (fileset in use):

IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = 
OBJECT_ID(N'[dbo].[SP1]') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[SP1]
GO

CREATE PROCEDURE [dbo].[SP1] 
     @in_Id int as 
BEGIN 
SELECT A, 
           B
FROM [dbo].[T1] 
WHERE C = @in_Id 
END
GO 

If you place additional  space after 'GO' command, for example 'GO ' instead 
'GO' and include <keepFormat>true</keepFormat> to configuration you receive 
exception 
"Incorrect syntax near 'GO'" during the execution.

Actually it inconvenient. I can not use not formatted code  because I have to 
support it in the future.  But it happened very frequently when developers put 
additional spaces after GO statement and it broken deployment procedure. 

As suggestion:
Add one more parameters for example "trimRow" and make trimming of the each row 
in keepFormat mode.

One more suggestion:
Allow possibilities to add more then one delimiter. It is necessary for 
resolving case insensitive delimiters. (GO, Go, go, etc.)


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to