Multiple statements in sql tag not working

Hello again,

I’m having trouble using the sql and sqlFile tags where the content has multiple SQL statements. The docs say I should be able to use a ‘go’ delimiter between statements - but I’m getting the following error if I try and do this:

              Caused By: Error executing SQL IF EXISTS                         (                                 SELECT *                                 FROM sys.objects                                 WHERE object_id = OBJECT_ID(N'[test].[currval]')                                 AND type in (N'FN', N'IF', N'TF', N'FS', N'FT')                         )                         DROP FUNCTION [test].[currval] go                         IF EXISTS                         (                         SELECT *                         FROM sys.objects                         WHERE object_id = OBJECT_ID(N'[test].[nextval]')                         AND type in (N'P', N'PC')                         )                         DROP PROCEDURE [test].[nextval]:           Caused By: Incorrect syntax near 'go'.         at liquibase.changelog.ChangeSet.execute(ChangeSet.java:279)

As you can see, my sql tag looks as follows:

    IF EXISTS ( SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[${cmuser}].[currval]') AND type in (N'FN', N'IF', N'TF', N'FS', N'FT') ) DROP FUNCTION [${cmuser}].[currval] go IF EXISTS ( SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[${cmuser}].[nextval]') AND type in (N'P', N'PC') ) DROP PROCEDURE [${cmuser}].[nextval]

It works ok if I replace the go with a semi-colon - but this isn’t native to SQL Server - so I’d prefer to use ‘go’ as the delimiter.

Any ideas?

Thanks,

Ben

PS - I’m using a 2.0 RC2 build.

‘GO’ should work. Maybe it’s case sensitive?

Also, I like to use CDATA in case I’m using xml entities in my SQL.

There was a bug related to the splitting of statements I fixed a few weeks ago.  Could you make sure you have the newest build for RC2?  The CI server is down for upgrades right now, unfortunately.  Can you build from source?

Nathan