Print ''
Print '----------------------------------------------------'
Print ' Script for JobMgr:'
Print ' FirstRevision: V2.0.0   22.03.2006'
Print ' CurrRevision : V2.1.1   11.02.2007'
Print ' Autor        : J.Feuerstein'
Print ' '
Print '----------------------------------------------------'
GO

use [#DB_N#]
GO

  Print 'Process:ProcStateCol01'
  UPDATE Objects_tbl SET ProcStateCol01 = 'X'  where (ProcStateCol01 = 'N' or ProcStateCol01 = 'P' or ProcStateCol01 is NULL) -- and ObjectName like N'XXXX%'
  Print '|-> DONE ProcStateCol01'
  go

  Print 'Process:ProcStateCol02'
  UPDATE Objects_tbl SET ProcStateCol02 = 'X'  where (ProcStateCol02 = 'N' or ProcStateCol02 = 'P' or ProcStateCol02 is NULL)
  Print '|-> DONE ProcStateCol02'
  go

  Print 'Process:ProcStateCol03'
  UPDATE Objects_tbl SET ProcStateCol03 = 'X'  where (ProcStateCol03 = 'N' or ProcStateCol03 = 'P' or ProcStateCol03 is NULL)
  Print '|-> DONE ProcStateCol03'
  go

  Print 'Process:ProcStateCol04'
  UPDATE Objects_tbl SET ProcStateCol04 = 'X'  where (ProcStateCol04 = 'N' or ProcStateCol04 = 'P' or ProcStateCol04 is NULL)
  Print '|-> DONE ProcStateCol04'
  go

  Print 'Process:ProcStateCol05'
  UPDATE Objects_tbl SET ProcStateCol05 = 'X'  where (ProcStateCol05 = 'N' or ProcStateCol05 = 'P' or ProcStateCol05 is NULL)
  Print '|-> DONE ProcStateCol05'
  go

  Print 'Process:ProcStateCol06'
  UPDATE Objects_tbl SET ProcStateCol06 = 'X'  where (ProcStateCol06 = 'N' or ProcStateCol06 = 'P' or ProcStateCol06 is NULL)
  Print '|-> DONE ProcStateCol06'
  go

  Print 'Process:ProcStateCol07'
  UPDATE Objects_tbl SET ProcStateCol07 = 'X'  where (ProcStateCol07 = 'N' or ProcStateCol07 = 'P' or ProcStateCol07 is NULL)
  Print '|-> DONE ProcStateCol07'
  go

  Print 'Process:ProcStateCol08'
  UPDATE Objects_tbl SET ProcStateCol08 = 'X'  where (ProcStateCol08 = 'N' or ProcStateCol08 = 'P' or ProcStateCol08 is NULL)
  Print '|-> DONE ProcStateCol08'
  go

  Print 'Process:ProcStateCol09'
  UPDATE Objects_tbl SET ProcStateCol09 = 'X'  where (ProcStateCol09 = 'N' or ProcStateCol09 = 'P' or ProcStateCol09 is NULL)
  Print '|-> DONE ProcStateCol09'
  go

  Print 'Process:ProcStateCol10'
  UPDATE Objects_tbl SET ProcStateCol10 = 'X'  where (ProcStateCol10 = 'N' or ProcStateCol10 = 'P' or ProcStateCol10 is NULL)
  Print '|-> DONE ProcStateCol10'
  go


Print ''
Print '---------------------------------------------------------'
Print ' JobMgr_Objects_Set_ProcStata_to_X.sql Script executed'
Print '---------------------------------------------------------'
GO