GO
/****** Object:  Table [dbo].[PersonTbl]    Script Date: 04/30/2011 21:01:01 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
if not exists(SELECT
COLUMN_NAME
from information_schema.columns 
WHERE TABLE_NAME = 'PersonTbl' and COLUMN_NAME='VisitorCostAcc')
Begin
Alter TABLE [dbo].[PersonTbl] ADD
	[VisitorCostAcc] [int] NULL,
	[VisitorBaseAmmount] [money] NULL,
	[VisitorIncreaseAmmount] [money] NULL,
	[VisitorIncreasePer] [real] NULL,
	[VisitorAutoDoc] [bit] NOT NULL  DEFAULT ((0)),
	[VisitorGoodActiveStat] [smallint] NOT NULL   DEFAULT ((0)),
	[VisitorPerActiveStat] [bit] NOT NULL  DEFAULT ((0)),
	[VisitorGoodGroupCode] [int] NULL
End
Go
if not exists(SELECT
COLUMN_NAME
from information_schema.columns 
WHERE TABLE_NAME = 'stockGroup2Tbl' and COLUMN_NAME='VisitPercent')
Alter TABLE [dbo].[stockGroup2Tbl] ADD
	[VisitPercent] [real]