Use ATNDBTest
Go

If Not Exists (SELECT * From INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'AccEntityKind' And COLUMN_NAME = 'Tag') Alter Table dbo.AccEntityKind Add Tag Varchar(50) NULL
If Not Exists (SELECT * From INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'AccGroupCodeBook' And COLUMN_NAME = 'Tag') Alter Table dbo.AccGroupCodeBook Add Tag Varchar(50) NULL
If Not Exists (SELECT * From INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'AccGeneralCodeBook' And COLUMN_NAME = 'Tag') Alter Table dbo.AccGeneralCodeBook Add Tag Varchar(50) NULL
If Not Exists (SELECT * From INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'AccAdjutantL1CodeBook' And COLUMN_NAME = 'Tag') Alter Table dbo.AccAdjutantL1CodeBook Add Tag Varchar(50) NULL
If Not Exists (SELECT * From INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'AccEntityL1CodeBook' And COLUMN_NAME = 'Tag') Alter Table dbo.AccEntityL1CodeBook Add Tag Varchar(50) NULL
If Not Exists (SELECT * From INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'AccEntityL2CodeBook' And COLUMN_NAME = 'Tag') Alter Table dbo.AccEntityL2CodeBook Add Tag Varchar(50) NULL
If Not Exists (SELECT * From INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'AccAdjutantL1Bridge' And COLUMN_NAME = 'Tag') Alter Table dbo.AccAdjutantL1Bridge Add Tag Varchar(50) NULL
If Not Exists (SELECT * From INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'AccSecondEntityCodeBook' And COLUMN_NAME = 'Tag') Alter Table dbo.AccSecondEntityCodeBook Add Tag Varchar(50) NULL
If Not Exists (SELECT * From INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'AccThirdEntityCodeBook' And COLUMN_NAME = 'Tag') Alter Table dbo.AccThirdEntityCodeBook Add Tag Varchar(50) NULL
If Not Exists (SELECT * From INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'AccDocumentHeader' And COLUMN_NAME = 'Tag') Alter Table dbo.AccDocumentHeader Add Tag Varchar(50) NULL
If Not Exists (SELECT * From INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'AccDocumentDetail' And COLUMN_NAME = 'Tag') Alter Table dbo.AccDocumentDetail Add Tag Varchar(50) NULL
