UPDATE TBDD_BASECONFIG SET DB_VERSION = '1.9.0.9'
GO
DELETE FROM TBDD_SQL_COMMANDS WHERE TITLE IN ('ZF_DISPLAY_PM_JOBS_INDIVIDUAL','ZF_DISPLAY_PM_JOBS_GROUP')
INSERT INTO [dbo].[TBDD_SQL_COMMANDS]
           ([TITLE]
           ,[SQL_COMMAND]
           )
     VALUES
           ('ZF_DISPLAY_PM_JOBS_INDIVIDUAL'
           ,'SELECT COUNT(A.DOC_ID) FROM
(SELECT DISTINCT DOC_ID FROM TBPM_PROFILE_FILES WHERE PROFIL_ID = 1) A'
         )
GO
INSERT INTO [dbo].[TBDD_SQL_COMMANDS]
           ([TITLE]
           ,[SQL_COMMAND]
           )
     VALUES
           ('ZF_DISPLAY_PM_JOBS_GROUP'
           ,'SELECT COUNT(A.DOC_ID) FROM
(SELECT DISTINCT DOC_ID FROM TBPM_PROFILE_FILES WHERE PROFIL_ID IN (SELECT PROFILE_ID FROM [dbo].[FNPM_GET_ACTIVE_PROFILES_USER] (@USR_ID))) A'
         )
GO