syntax error in the SQL script
LexDeveloper
Posts: 3
The SQL script generated by SQL Compare 5 version 5.2.0.32 contained a syntax error that caused the sync to fail.
The unlicensed trial version generated this block with an extra ']':
Let me know if additional information is required.
The unlicensed trial version generated this block with an extra ']':
PRINT N'Dropping constraints from [dbo].[field_reporter_text]' GO ALTER TABLE [dbo].[field_reporter_text] DROP CONSTRAINT [DF_field_reporter_text_frt_lang_code frt_lang_code]] GO IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION GO IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END GO
Let me know if additional information is required.
This discussion has been closed.
Comments
That's interesting... what name do you get back when you run
but that made me dig deeper into our database, and that is where the problem was. :oops:
When we generated the script for the destination table, we got showing the contraint definition was bad.
Somehow, the contraint was not showing in the diagrams, or design wizards in Enterprise Manager. :shock: SQL Compare generated the script as it should have. After the correction to our table was made, SQL Compare worked fine, and saved us a great deal of time.
Thank you for the assistance.
I figured that SQL Compare must have been picking up that extra bracket from somewhere. I'm glad that you've figured it out!