Syntax Error in generate script (=bug?)

robleenheerrobleenheer Posts: 2
edited May 18, 2010 8:48AM in SQL Compare Previous Versions
SQL Compare generates the following script:

ALTER TABLE [dbo].[tblCurrency] DROP CONSTRAINT [[dbo].[tblCurrency]CurrencyDefault]

which causes an error when run against the target database.
The correct syntax is:

ALTER TABLE [dbo].[tblCurrency] DROP CONSTRAINT dbo][b[/b].[tblCurrency]]CurrencyDefault]

(see 2x square bracket added).

If I manually go through the errors in the script and update them as above, the entire script runs fine.

The test environment is SQLExpress2008.

Anyone's comments?!


  • looks like you have a square bracket in the object name. Is that the case?

    If so, that's a known issue (SC-3375) which I've now added your report to - I'm not sure what the timescale for fixing it is, alas.
    Software Developer
    Redgate Software
Sign In or Register to comment.