• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 750
  • Last Modified:

Missing end comment mark '*/'.

Anybody knows why I am getting the error in Query Analyzer?
Below I pasted executed code:


SET QUOTED_IDENTIFIER ON
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
SET ARITHABORT ON
SET NUMERIC_ROUNDABORT OFF
SET CONCAT_NULL_YIELDS_NULL ON
SET ANSI_NULLS ON
SET ANSI_PADDING ON
SET ANSI_WARNINGS ON

/*
BEGIN TRANSACTION
ALTER TABLE dbo.table_name
      DROP CONSTRAINT DF_table_name_column_name
GO
COMMIT
*/

0
quasar_ee
Asked:
quasar_ee
  • 2
2 Solutions
 
Anthony PerkinsCommented:
Try it this way (lose the GO):

SET QUOTED_IDENTIFIER ON
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
SET ARITHABORT ON
SET NUMERIC_ROUNDABORT OFF
SET CONCAT_NULL_YIELDS_NULL ON
SET ANSI_NULLS ON
SET ANSI_PADDING ON
SET ANSI_WARNINGS ON

/*
BEGIN TRANSACTION
ALTER TABLE dbo.table_name
     DROP CONSTRAINT DF_table_name_column_name
COMMIT
*/
0
 
Anthony PerkinsCommented:
Or:

SET QUOTED_IDENTIFIER ON
SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
SET ARITHABORT ON
SET NUMERIC_ROUNDABORT OFF
SET CONCAT_NULL_YIELDS_NULL ON
SET ANSI_NULLS ON
SET ANSI_PADDING ON
SET ANSI_WARNINGS ON

/*
BEGIN TRANSACTION
ALTER TABLE dbo.table_name
     DROP CONSTRAINT DF_table_name_column_name
-- GO
COMMIT
*/
0
 
Aneesh RetnakaranDatabase AdministratorCommented:
u can't use 'GO' inside /* .. */
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now