USE @DBNAMEYEAR 

begin tran updateIOINFO
If Not Exists(SELECT     id
                FROM         syscolumns
                WHERE     (name = 'FromWeb') AND (id = OBJECT_ID(N'IOInfo'))) 
    ALTER TABLE dbo.IOInfo ADD FromWeb numeric(6, 0) NULL

If Not Exists(SELECT     id
                FROM         syscolumns
                WHERE     (name = 'EnterFromWeb') AND (id = OBJECT_ID(N'IOInfo'))) 
    ALTER TABLE dbo.IOInfo ADD EnterFromWeb numeric(6, 0) NULL

If Not Exists(SELECT     id
                FROM         syscolumns
                WHERE     (name = 'ExitFromWeb') AND (id = OBJECT_ID(N'IOInfo'))) 
    ALTER TABLE dbo.IOInfo ADD ExitFromWeb numeric(6, 0) NULL

if @@ERROR > 0 
  rollback tran updateIOINFO	
commit 