Apparent problem w/DEFAULT constraints of NEWSEQUENTIALID()
jalbert
Posts: 18
When I try to synchronize this following scripted table:
I get the following error message:
It would appear that SQL Compare 6.1 is escaping/qualifying the "NEWSEQUENTIALID" text instead of recognizing it as a built-in keyword. Its close relative NEWID() works correctly.
Is there a workaround? Thanks.
CREATE TABLE foo ( foo_id UNIQUEIDENTIFIER CONSTRAINT default_foo_id DEFAULT NEWSEQUENTIALID() NOT NULL );
I get the following error message:
The following error message was returned from the SQL Server: [128] The name "NEWSEQUENTIALID" is not permitted in this context. Valid expressions are constants, constant expressions, and (in some contexts) variables. Column names are not permitted. The following SQL command caused the error: CREATE TABLE [dbo].[foo] ( [foo_id] [UNIQUEIDENTIFIER] NOT NULL CONSTRAINT [default_foo_id] DEFAULT ([NEWSEQUENTIALID]()) )
It would appear that SQL Compare 6.1 is escaping/qualifying the "NEWSEQUENTIALID" text instead of recognizing it as a built-in keyword. Its close relative NEWID() works correctly.
Is there a workaround? Thanks.
Comments
It looks like that you have found a bug in the script comparison. I think the only workaround will be to search replace the string in the synchronisation script, sorry I know this isn't a perfect solution. I will double check with the developers and get back to you shortly about this.
Regards,
Jonathan
-Project Manager
-Red Gate Software Ltd
Regards,
Jonathan
-Project Manager
-Red Gate Software Ltd
The name "newsequentialid" is not permitted in this context. Valid expressions are constants, constant expressions, and (in some contexts) variables. Column names are not permitted.
The database update failed