Print ''
Print '----------------------------------------------------'
Print ' PlmJobManager Maintain Script                      '
Print ' Createt      : 01.02.2008'
Print ' Autor        : J.Feuerstein'
Print ' '
Print ' Database Name: #DB_N#'
Print '----------------------------------------------------'

use [#DB_N#]


Print ('sets dbo.JobControlRules_tbl ObjectsSendCount = 0 , JobNumberLast = 0 where JobAktive = true')

SELECT
  dbo.JobControlRules_tbl.JobOrder,
  dbo.JobControlRules_tbl.JobName,
  dbo.JobControlRules_tbl.JobNumberLast,
  dbo.JobControlRules_tbl.ObjectsSendCount
FROM
  dbo.JobControlRules_tbl
WHERE JobAktive = 1
ORDER BY
  dbo.JobControlRules_tbl.JobOrder

UPDATE dbo.JobControlRules_tbl SET ObjectsSendCount = 0, JobNumberLast = 0 WHERE JobAktive = 1
-- Print ('Info: you can update via F5 button the data in the JobContol Tab (not required)')

Print ''
Print '----------------------------------------------------'
Print 'Result table for: #DB_N#  created'
Print '----------------------------------------------------'
GO
