Syntax Error in generate script (=bug?)

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?!

Comments

  • Michelle TMichelle T Posts: 566 Gold 1
    ...it 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.