when I runn my script it fails on the alter statement

  • I need to fix this so when I run the attached script it will not fail. What do I need to fix here.

    ALTER TABLE tbl_index_ticket_companies

    ADD FlagRemoved BIT NULL CONSTRAINT [DF_tbl_index_ticket_companies_FlagRemoved] DEFAULT ((0))

    GO

    ALTER TABLE tbl_index_ticket_companies

    ADD AgentRemoved VARCHAR(50) NULL

    GO

    ALTER TABLE tbl_index_ticket_companies

    ADD DateRemoved DATETIME NULL

    GO

    ALTER TABLE tbl_index_ticket_pocs

    ADD FlagRemoved BIT NULL CONSTRAINT [DF_tbl_index_ticket_pocs_FlagRemoved] DEFAULT ((0))

    GO

    ALTER TABLE tbl_index_ticket_pocs

    ADD AgentRemoved VARCHAR(50) NULL

    GO

    ALTER TABLE tbl_index_ticket_pocs

    ADD DateRemoved DATETIME NULL

    GO

    ALTER TABLE tbl_index_ticket_services

    ADD ServiceID INT NULL

    GO

    ALTER TABLE tbl_index_ticket_services

    ADD FlagRemoved BIT NULL CONSTRAINT [DF_tbl_index_ticket_services_FlagRemoved] DEFAULT ((0))

    GO

    ALTER TABLE tbl_index_ticket_services

    ADD AgentRemoved NVARCHAR(50) NULL

    GO

    ALTER TABLE tbl_index_ticket_services

    ADD DateRemoved DATETIME NULL

    GO

  • Will you post the error messages you are getting.

    -

  • Maybe u r getting error column name not found when running those ALTER TABLE scripts. errors r usually self explanatory. If it says column name not found then maybe u r trying to ALTER columns where column doesnt exists on those tables. If getting object not found then maybe ur Table doesnt exists which u r tryin to ALTER.

  • I solved it. It was because I was running it twice.

    Thanks guys.

  • Nice

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply