/****************************************************************************************************
**
**	This script will create the SQL Server stored procedures needed for Microsoft Project Server.
**
**	Privileges needed: member of db_owner or (db_ddladmin and db_securityadmin)
**
****************************************************************************************************/

/* Drop the MSP_PROJECTS_AI_TRG trigger if it exists when upgrading 10.5 - 11, since it only needs to exist in a 10.5 scenario */

IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PROJECTS_AI_TRG')
AND OBJECTPROPERTY(id, N'IsTrigger') = 1)
DROP TRIGGER dbo.MSP_PROJECTS_AI_TRG
GO 


/* Remove obsolete P10 stored procedures */


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_ADM_GetAllCategories]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_ADM_GetAllCategories]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_ADM_GetCategoriesForResID]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_ADM_GetCategoriesForResID]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_ADM_GetProjectsForCategoryID]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_ADM_GetProjectsForCategoryID]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_ADM_GetUsersForCategoryID]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_ADM_GetUsersForCategoryID]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_ADM_GetViewsForCategoryID]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_ADM_GetViewsForCategoryID]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_ADM_GetWCVResourcesForResID]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_ADM_GetWCVResourcesForResID]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_ADM_SecGetGroupCategoriesByGroupGUID]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_ADM_SecGetGroupCategoriesByGroupGUID]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_ADM_SecGetGroupMembersByGroupGUID]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_ADM_SecGetGroupMembersByGroupGUID]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_BUS_DeleteAcceptedMsgAssnFromMsgId]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_BUS_DeleteAcceptedMsgAssnFromMsgId]
GO



IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_BUS_DeleteDelegMsgFromMsgIdIfMsgDelegCleared]')	
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_BUS_DeleteDelegMsgFromMsgIdIfMsgDelegCleared]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_BUS_DeleteMsgAssnFromMsgIdAndAssnId]')	
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_BUS_DeleteMsgAssnFromMsgIdAndAssnId]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_BUS_DeleteMsgAssnFromMsgIdIfMsgCleared]')	
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_BUS_DeleteMsgAssnFromMsgIdIfMsgCleared]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_BUS_DeleteMsgDelegFromMsgIdNotPending]')	
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_BUS_DeleteMsgDelegFromMsgIdNotPending]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_BUS_DeleteMsgFromMsgId]')	
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_BUS_DeleteMsgFromMsgId]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_BUS_DeleteMsgFromMsgIdIfMsgAssnCleared]')	
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_BUS_DeleteMsgFromMsgIdIfMsgAssnCleared]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_BUS_DeleteNewTaskMsgAssnFromAssnId]')	
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_BUS_DeleteNewTaskMsgAssnFromAssnId]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_BUS_DeleteNewTaskMsgIfMsgAssnCleared]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_BUS_DeleteNewTaskMsgIfMsgAssnCleared]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_BUS_GetAllResourceForResId]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_BUS_GetAllResourceForResId]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_BUS_GetFileIdForAutoupdateFromMgrID]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_BUS_GetFileIdForAutoupdateFromMgrID]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_BUS_GetFileIdFromMgrID]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_BUS_GetFileIdFromMgrID]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_BUS_GetFileIDsRequiringDelegationUpdate]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_BUS_GetFileIDsRequiringDelegationUpdate]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_BUS_GetFileIDsRequiringDelegUpdateForDelegMsg]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_BUS_GetFileIDsRequiringDelegUpdateForDelegMsg]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_BUS_GetFileIDsRequiringDelegUpdateForNormalMsg]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_BUS_GetFileIDsRequiringDelegUpdateForNormalMsg]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_BUS_GetNonWorkingForProjUpdate]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_BUS_GetNonWorkingForProjUpdate]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_BUS_GetOfflineFlagForResID]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_BUS_GetOfflineFlagForResID]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_BUS_GetPortfolioViewCustomFieldInfos]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_BUS_GetPortfolioViewCustomFieldInfos]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_BUS_GetPortfolioViewCustomFieldsAllProjects]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_BUS_GetPortfolioViewCustomFieldsAllProjects]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_BUS_GetPortfolioViewCustomFieldsSpecifiedProjects]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_BUS_GetPortfolioViewCustomFieldsSpecifiedProjects]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_BUS_GetResCreatedAssn]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_BUS_GetResCreatedAssn]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_BUS_GetStatusRepAndDueForResIDAndSRID]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_BUS_GetStatusRepAndDueForResIDAndSRID]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_BUS_GetWebclientViewActuals]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_BUS_GetWebclientViewActuals]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_BUS_GetWebclientViewCustomFieldInfos]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_BUS_GetWebclientViewCustomFieldInfos]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_BUS_GetWebclientViewCustomFields]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_BUS_GetWebclientViewCustomFields]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_BUS_MarkAutoUpdatedMsgAssnFromMsgId]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_BUS_MarkAutoUpdatedMsgAssnFromMsgId]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_BUS_MarkAutoUpdatedMsgAssnFromMsgIdAndAssnId]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_BUS_MarkAutoUpdatedMsgAssnFromMsgIdAndAssnId]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_BUS_MarkAutoUpdatedMsgFromMsgId]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_BUS_MarkAutoUpdatedMsgFromMsgId]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_BUS_MarkAutoUpdatedMsgFromMsgIdIfMsgAssnCleared]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_BUS_MarkAutoUpdatedMsgFromMsgIdIfMsgAssnCleared]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_BUS_MarkNewTaskMsgAssnFromAssnId]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_BUS_MarkNewTaskMsgAssnFromAssnId]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_BUS_MarkPartialAutoUpdatedMsgAssnFromMsgIdAndAssnId]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_BUS_MarkPartialAutoUpdatedMsgAssnFromMsgIdAndAssnId]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_BUS_MarkPartialUpdatedNewTaskMsgFromAssnId]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_BUS_MarkPartialUpdatedNewTaskMsgFromAssnId]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_BUS_MarkUpdatedNewTaskMsgIfMsgAssnCleared]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_BUS_MarkUpdatedNewTaskMsgIfMsgAssnCleared]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_BUS_SetMsgProcessed]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_BUS_SetMsgProcessed]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_BUS_UpdateAssnDirtyFlagForAssnId]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_BUS_UpdateAssnDirtyFlagForAssnId]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_BUS_UpdateAssnTrackingModeForAssnId]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_BUS_UpdateAssnTrackingModeForAssnId]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_BUS_UpdateMsgDelegationForFileID]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_BUS_UpdateMsgDelegationForFileID]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_BUS_UpdateMsgDelegationForFileID2]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_BUS_UpdateMsgDelegationForFileID2]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_CHK_CheckDelegPending]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_CHK_CheckDelegPending]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_CHK_GetAllCustomFieldsForAssnID]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_CHK_GetAllCustomFieldsForAssnID]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_CHK_GetAllCustomFieldsForNewTasks]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_CHK_GetAllCustomFieldsForNewTasks]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_CHK_GetAllCustomFieldsForNewTasksForRules]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_CHK_GetAllCustomFieldsForNewTasksForRules]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_CHK_GetTasksUpdateInfoForAssnList]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_CHK_GetTasksUpdateInfoForAssnList]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_CHK_ResourceValidation]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_CHK_ResourceValidation]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_AcceptAllDelegForMsgID]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_AcceptAllDelegForMsgID]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_AddNewResourceToProjManagerCategory]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_AddNewResourceToProjManagerCategory]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_AddNewResourceToTeamMemberCategory]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_AddNewResourceToTeamMemberCategory]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_AddViewCategoriesForResID]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_AddViewCategoriesForResID]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_AddViewProjectsForCatProjectID]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_AddViewProjectsForCatProjectID]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_AddViewReportsForCatViewID]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_AddViewReportsForCatViewID]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_AddViewResourcesForResID]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_AddViewResourcesForResID]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_DelegatorAndDelegeeNamesFromMsgID]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_DelegatorAndDelegeeNamesFromMsgID]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_DelegatorNameFromMsgID]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_DelegatorNameFromMsgID]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_DelegeeNamesFromMsgID]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_DelegeeNamesFromMsgID]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_DeleteMsgDelegForMsg]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_DeleteMsgDelegForMsg]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_DeleteMsgDelegForMsgForProjIDs]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_DeleteMsgDelegForMsgForProjIDs]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_DeleteMsgDelegForMsgForResId]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_DeleteMsgDelegForMsgForResId]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_DeleteMsgDelegForMsgID]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_DeleteMsgDelegForMsgID]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_DeleteMsgDelegForMsgIDs]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_DeleteMsgDelegForMsgIDs]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_DeleteMsgDelegForMsgOlderThan]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_DeleteMsgDelegForMsgOlderThan]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_DeleteMsgDelegForMsgOlderThanForResId]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_DeleteMsgDelegForMsgOlderThanForResId]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_DeleteMsgDelegForMsgSentBtw]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_DeleteMsgDelegForMsgSentBtw]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_DeleteMsgDelegForMsgSentBtwForResId]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_DeleteMsgDelegForMsgSentBtwForResId]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_DeleteMsgDelegIDForMsgID]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_DeleteMsgDelegIDForMsgID]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_DeleteResourceCategoryForResID]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_DeleteResourceCategoryForResID]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_DeleteViewCategoriesForResID]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_DeleteViewCategoriesForResID]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_DeleteViewCategoryForCatID]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_DeleteViewCategoryForCatID]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_DeleteViewProjectsForCatID]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_DeleteViewProjectsForCatID]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_DeleteViewReportsForCatID]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_DeleteViewReportsForCatID]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_DeleteViewResourcesForResID]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_DeleteViewResourcesForResID]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_DeleteViewResourcesForResIDorMgrID]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_DeleteViewResourcesForResIDorMgrID]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_DeleteViewUsersForCatID]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_DeleteViewUsersForCatID]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_DeleteWorkgroupFieldForProjIDs]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_DeleteWorkgroupFieldForProjIDs]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_GetAcceptedTasks]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_GetAcceptedTasks]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_GetActuals]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_GetActuals]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_GetAllAssnsForDeleg]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_GetAllAssnsForDeleg]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_GetAllAssnsForDelegReqMgr]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_GetAllAssnsForDelegReqMgr]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_GetAllCustomFieldsForMsgID]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_GetAllCustomFieldsForMsgID]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_GetAssignmentInfo]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_GetAssignmentInfo]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_GetCategoryForCatID]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_GetCategoryForCatID]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_GetCatIncludeAllProjForView]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_GetCatIncludeAllProjForView]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_GetCatIncludeTAProjForView]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_GetCatIncludeTAProjForView]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_GetEmptyMsgDeleg]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_GetEmptyMsgDeleg]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_GetEmptyProjects]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_GetEmptyProjects]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_GetNewTasks]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_GetNewTasks]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_GetProjectViewReportsForResProjID]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_GetProjectViewReportsForResProjID]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_GetSortedMsgForRecipientID]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_GetSortedMsgForRecipientID]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_GetViewReportsForResIDandType]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_GetViewReportsForResIDandType]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_InListQuery_GetAssnIDForDeleg]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_InListQuery_GetAssnIDForDeleg]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_InListQuery_GetAssnIDForTimesheet]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_InListQuery_GetAssnIDForTimesheet]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_InListQuery_GetCFInfoID1]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_InListQuery_GetCFInfoID1]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_InListQuery_GetReportCatViewID1]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_InListQuery_GetReportCatViewID1]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_InListQuery_GetReportCatViewID2]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_InListQuery_GetReportCatViewID2]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_InListQuery_GetReportCatViewID3]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_InListQuery_GetReportCatViewID3]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_InListQuery_GetReportCatViewID4]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_InListQuery_GetReportCatViewID4]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_InListQuery_GetReportCatViewID5]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_InListQuery_GetReportCatViewID5]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_InListQuery_GetReportCatViewID6]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_InListQuery_GetReportCatViewID6]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_InListQuery_GetReportCatViewID7]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_InListQuery_GetReportCatViewID7]
GO


IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[MSP_WEB_SP_QRY_ManagerNameFromMsgID]')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE [dbo].[MSP_WEB_SP_QRY_ManagerNameFromMsgID]
GO

/* Finished removing obsolete procedures */





/* Query #9000 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetResIdAuthenInfoForName')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetResIdAuthenInfoForName
GO

/* Query #9001 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetResIdAuthenInfoForResID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetResIdAuthenInfoForResID
GO

/* Query #10001 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetUserLst')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetUserLst
GO

/* Query #10002 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetChannelTimes')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetChannelTimes
GO

/* Query #10003 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetFullUserLst')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetFullUserLst
GO

/* Query #10004 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetProjectSummaryTaskAssn')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetProjectSummaryTaskAssn
GO

/* Query #10005 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetTasksMsgAssnForMsgID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetTasksMsgAssnForMsgID
GO

/* Query #10006 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetUnRequestedReportsForUser')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetUnRequestedReportsForUser
GO

/* Query #10007 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetMsgForSamePeriod')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetMsgForSamePeriod
GO

/* Query #10008 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetMsgForMsgIDAndResID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetMsgForMsgIDAndResID
GO

/* Query #10009 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetTasksMsgAssn')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetTasksMsgAssn
GO

/* Query #10010 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetTasksMessages')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetTasksMessages
GO

/* Query #10011 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetTasksIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetTasksIDs
GO

/* Query #10012 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllResourceForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllResourceForResId
GO

/* Query #10013 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetResIdFromName')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetResIdFromName
GO

/* Query #10014 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetFileIdFromPathOwner')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetFileIdFromPathOwner
GO

/* Query #10015 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllResourceForName')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllResourceForName
GO

/* Query #10016 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteCFForProjectSummaryAssn')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteCFForProjectSummaryAssn
GO

/* Query #10017 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllMessagesForMessageId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllMessagesForMessageId
GO

/* Query #10018 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllAssignmentsForFileIdTaskProjId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllAssignmentsForFileIdTaskProjId
GO

/* Query #10019 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllAssignmentsForFileIdAssnProjId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllAssignmentsForFileIdAssnProjId
GO

/* Query #10020 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllFilesFromPathOwner')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllFilesFromPathOwner
GO

/* Query #10021 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetSummaryAssnFromProjIdAndResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetSummaryAssnFromProjIdAndResId
GO

/* Query #10022 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllAssignmentsForFileIdAssnProjIdNoResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllAssignmentsForFileIdAssnProjIdNoResId
GO

/* Query #10023 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetSRIDFromReportNameResID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetSRIDFromReportNameResID
GO

/* Query #10024 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllCFForProjID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllCFForProjID
GO

/* Query #10027 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetResIDForResIDAndCookieLongs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetResIDForResIDAndCookieLongs
GO

/* Query #10028 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_UpdateUpdatedByMgrToFalse')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_UpdateUpdatedByMgrToFalse
GO

/* Query #10030 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetMgrIDForMsgIDAndCookieLongs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetMgrIDForMsgIDAndCookieLongs
GO

/* Query #10031 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_UpdateAssnDirtyFlagForMsgID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_UpdateAssnDirtyFlagForMsgID
GO

/* Query #10032 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetDSNByName')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetDSNByName
GO

/* Query #10033 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetNameCookieLongsForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetNameCookieLongsForResId
GO

/* Query #10034 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllAssignmentsForAssnId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllAssignmentsForAssnId
GO

/* Query #10035 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAdminRandomSeeds')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAdminRandomSeeds
GO

/* Query #10036 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_UpdateAssnTrackingModeForMsgID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_UpdateAssnTrackingModeForMsgID
GO

/* Query #10040 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetResNameAndNoRecords')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetResNameAndNoRecords
GO

/* Query #10041 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetResAnsReportNameAndNoRecords')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetResAnsReportNameAndNoRecords
GO

/* Query #10042 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetFileIDProjNameFromFilesForResID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetFileIDProjNameFromFilesForResID
GO

/* Query #10043 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetFileIDProjNameFromFilesForNotResID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetFileIDProjNameFromFilesForNotResID
GO

/* Query #10044 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllFromResourcesReportsAndResp')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllFromResourcesReportsAndResp
GO

/* Query #10045 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllFromStatusRespOrderSubmitted')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllFromStatusRespOrderSubmitted
GO

/* Query #10046 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetRespnseIDFromResponsesAndDist')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetRespnseIDFromResponsesAndDist
GO

/* Query #10047 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetReportsForMgrOrderName')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetReportsForMgrOrderName
GO

/* Query #10048 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetStatusRequestsForResIDNotSent')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetStatusRequestsForResIDNotSent
GO

/* Query #10051 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_NewTasksCreatedByResForMgr')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_NewTasksCreatedByResForMgr
GO

/* Query #10054 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetNamePathFromFileID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetNamePathFromFileID
GO

/* Query #10055 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetMessagesForResID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetMessagesForResID
GO

/* Query #10056 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetFileNameFromFileID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetFileNameFromFileID
GO

/* Query #10057 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllStatusResponses')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllStatusResponses
GO

/* Query #10058 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetStatusResponsesForRespID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetStatusResponsesForRespID
GO

/* Query #10059 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetStatusRequestsForResIDAndSRID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetStatusRequestsForResIDAndSRID
GO

/* Query #10060 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetFlagNewRequestForResIDAndSRID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetFlagNewRequestForResIDAndSRID
GO

/* Query #10061 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetStatusRepAndRespForRespID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetStatusRepAndRespForRespID
GO

/* Query #10062 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetStatusRepAndDueForResIDAndSRID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetStatusRepAndDueForResIDAndSRID
GO

/* Query #10063 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetReportNameFromSRID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetReportNameFromSRID
GO

/* Query #10064 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllResourcesOrderByName')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllResourcesOrderByName
GO

/* Query #10065 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetStatusResponsesForRespIDAndUS')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetStatusResponsesForRespIDAndUS
GO

/* Query #10066 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllReportsFromSRIDAndUnreq')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllReportsFromSRIDAndUnreq
GO

/* Query #10067 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetReportNameFromSResp')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetReportNameFromSResp
GO

/* Query #10068 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetResNameAndAllStatRespForDates')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetResNameAndAllStatRespForDates
GO

/* Query #10069 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetDistinctRecipIDFromStatusReq')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetDistinctRecipIDFromStatusReq
GO

/* Query #10070 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllFromAssnID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllFromAssnID
GO

/* Query #10071 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetFileIDProjectNameFromFiles')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetFileIDProjectNameFromFiles
GO

/* Query #10072 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetManagersFromResources')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetManagersFromResources
GO

/* Query #10076 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetMsgForRecipientID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetMsgForRecipientID
GO

/* Query #10077 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetNewTaskRequests')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetNewTaskRequests
GO

/* Query #10078 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetNewSrResponses')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetNewSrResponses
GO

/* Query #10079 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetNewSrRequests')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetNewSrRequests
GO

/* Query #10081 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllReportsFromSRID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllReportsFromSRID
GO

/* Query #10082 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetEmptyResource')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetEmptyResource
GO

/* Query #10083 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetRequestsFromSRID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetRequestsFromSRID
GO

/* Query #10085 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetSrDistFromRespID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetSrDistFromRespID
GO

/* Query #10086 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllResources')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllResources
GO

/* Query #10087 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetResIDNameFromSrDist')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetResIDNameFromSrDist
GO

/* Query #10088 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetActiveRequestsFromSRID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetActiveRequestsFromSRID
GO

/* Query #10089 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetUnmatchedSRForSRID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetUnmatchedSRForSRID
GO

/* Query #10091 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetResNameAndAllStatRespForDatesResID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetResNameAndAllStatRespForDatesResID
GO

/* Query #10092 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAutoMergeForRequest')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAutoMergeForRequest
GO

/* Query #10093 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllStatRespForDates')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllStatRespForDates
GO

/* Query #10094 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllStatRespForDatesResID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllStatRespForDatesResID
GO

/* Query #10095 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetNewRespForSRID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetNewRespForSRID
GO

/* Query #10096 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetMaxDateForSRID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetMaxDateForSRID
GO

/* Query #10097 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetSubmittedResponsesForUpdateID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetSubmittedResponsesForUpdateID
GO

/* Query #10098 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllFreqForSRID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllFreqForSRID
GO

/* Query #10099 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllReportsFreqForSRID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllReportsFreqForSRID
GO

/* Query #10100 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetCurrentFreq')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetCurrentFreq
GO

/* Query #10101 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetNewRespForSRIDToday')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetNewRespForSRIDToday
GO

/* Query #10102 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetFlagMatchingForSRIDAfterDate')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetFlagMatchingForSRIDAfterDate
GO

/* Query #10103 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetSubmittedRespIDForSRID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetSubmittedRespIDForSRID
GO

/* Query #10104 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetRespForSRIDResPeriod')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetRespForSRIDResPeriod
GO

/* Query #10105 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetRespUpdatesForRespID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetRespUpdatesForRespID
GO

/* Query #10106 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetResNameAndRespUpdatesForRespID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetResNameAndRespUpdatesForRespID
GO

/* Query #10107 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllFreqForRespID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllFreqForRespID
GO

/* Query #10108 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetOtherSRIDForResID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetOtherSRIDForResID
GO

/* Query #10109 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetDistinctCustomFieldsForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetDistinctCustomFieldsForResId
GO

/* Query #10111 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetOtherResponsesForResID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetOtherResponsesForResID
GO

/* Query #10112 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllResponsesResNameForSRID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllResponsesResNameForSRID
GO

/* Query #10113 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetRespFlagsForSRID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetRespFlagsForSRID
GO

/* Query #10115 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteActualsForResIDAndType')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteActualsForResIDAndType
GO

/* Query #10117 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetDistinctCustomFieldsForResIDSortByName')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetDistinctCustomFieldsForResIDSortByName
GO

/* Query #10118 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteExtraLateReports')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteExtraLateReports
GO

/* Query #10119 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetExistingReportsAfterDueOnDate')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetExistingReportsAfterDueOnDate
GO

/* Query #10121 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetProjectCFInfoForFileID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetProjectCFInfoForFileID
GO

/* Query #10124 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteMsgForMsgID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteMsgForMsgID
GO

/* Query #10125 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteMsgAssnIDForMsgID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteMsgAssnIDForMsgID
GO

/* Query #10127 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_CountOfOverdueStatusReports')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_CountOfOverdueStatusReports
GO

/* Query #10128 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_CountOfNewTasks')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_CountOfNewTasks
GO

/* Query #10129 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_CountOfOverdueTasks')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_CountOfOverdueTasks
GO

/* Query #10136 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_CountOfAcceptedTasksForMsgID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_CountOfAcceptedTasksForMsgID
GO

/* Query #10137 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetDelegPendingAssnForFileId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetDelegPendingAssnForFileId
GO

/* Query #10144 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_LeadAndDelegeeNamesFromMsgID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_LeadAndDelegeeNamesFromMsgID
GO


/* Query #10145 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_CountOfPendingApprovals')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_CountOfPendingApprovals
GO

/* Query #10146 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_CountOfUnsubmittedTimesheets')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_CountOfUnsubmittedTimesheets
GO

/* Query #10147 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_CountOfUnsubmittedTasks')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_CountOfUnsubmittedTasks
GO


/* Query #10151 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ResponseRespIDCheck')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ResponseRespIDCheck
GO

/* Query #10152 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_UnreqSRIDCheck')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_UnreqSRIDCheck
GO

/* Query #10153 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_MgrSRIDCheck')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_MgrSRIDCheck
GO

/* Query #10154 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_RequestSRIDCheck')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_RequestSRIDCheck
GO

/* Query #10155 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_MgrRespIDCheck')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_MgrRespIDCheck
GO

/* Query #10156 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_MgrResIDCheck')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_MgrResIDCheck
GO

/* Query #10157 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DistRespIDCheck')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DistRespIDCheck
GO

/* Query #10158 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DistSRIDCheck')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DistSRIDCheck
GO

/* Query #10159 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DistWRESIDCheck')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DistWRESIDCheck
GO

/* Query #10160 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetEmptyStatusResponses')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetEmptyStatusResponses
GO

/* Query #10161 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetEmptyStatusDistribution')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetEmptyStatusDistribution
GO

/* Query #10162 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetEmptyDeleg')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetEmptyDeleg
GO

/* Query #10163 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetEmptyDelegMap')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetEmptyDelegMap
GO

/* Query #10164 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetResourceListForExport')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetResourceListForExport
GO

/* Query #10173 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAssnForDelegUpdate')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAssnForDelegUpdate
GO

/* Query #10175 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAssnForDelegUpdateWDelegator')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAssnForDelegUpdateWDelegator
GO

/* Query #10176 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetTaskProjNameForAssnId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetTaskProjNameForAssnId
GO

/* Query #10177 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetDelegHistForAssn')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetDelegHistForAssn
GO

/* Query #10180 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllActiveUsersExceptYouOBName')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllActiveUsersExceptYouOBName
GO

/* Query #10181 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteAssignmentForAssnID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteAssignmentForAssnID
GO

/* Query #10182 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ReplaceDelegAssnWithNewAssn')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ReplaceDelegAssnWithNewAssn
GO

/* Query #10183 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetMatchingAssnForDelegee')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetMatchingAssnForDelegee
GO

/* Query #10184 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ReplaceAllDelegAssnWithNewAssn')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ReplaceAllDelegAssnWithNewAssn
GO

/* Query #10185 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetDelegAssnsForReplication')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetDelegAssnsForReplication
GO

/* Query #10189 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllMyTasksThatIReportToLeads')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllMyTasksThatIReportToLeads
GO

/* Query #10190 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_SetRequestUpdateFlagForTeamStatusMsg')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_SetRequestUpdateFlagForTeamStatusMsg
GO

/* Query #10200 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteAllSRRespForResID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteAllSRRespForResID
GO

/* Query #10201 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteAllSRReqForResID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteAllSRReqForResID
GO

/* Query #10202 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteAllSRDistForResID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteAllSRDistForResID
GO

/* Query #10203 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteAllActualsForResID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteAllActualsForResID
GO

/* Query #10204 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_SelectAllMsgForResID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_SelectAllMsgForResID
GO

/* Query #10205 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_SelectAllAssignForResID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_SelectAllAssignForResID
GO

/* Query #10206 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteAllCFForAssnID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteAllCFForAssnID
GO

/* Query #10207 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_SelectAssignForProjID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_SelectAssignForProjID
GO

/* Query #10209 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_SelectAllMsgForProjID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_SelectAllMsgForProjID
GO

/* Query #10210 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_SelectAllSRReqForResID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_SelectAllSRReqForResID
GO

/* Query #10211 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllResourceForNameEvenDisabled')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllResourceForNameEvenDisabled
GO

/* Query #10212 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetNewRespForSRID1')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetNewRespForSRID1
GO

/* Query #10213 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_SetPartialTasksToNonPending')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_SetPartialTasksToNonPending
GO

/* Query #10214 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_SetResourceUpdateFlagForTeamStatusMsg')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_SetResourceUpdateFlagForTeamStatusMsg
GO

/* Query #10215 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_SetActualsPendingFlagForTeamStatusMsg')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_SetActualsPendingFlagForTeamStatusMsg
GO

/* Query #10216 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllResourceForWindowsAccountEvenDisabled')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllResourceForWindowsAccountEvenDisabled
GO

/* Query #10300 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetEntResourceUIDandType')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetEntResourceUIDandType
GO

/* Query #10301 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetEntResourceMINMAXTPDates')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetEntResourceMINMAXTPDates
GO

/* Query #12001 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_SelectAllProjects')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_SelectAllProjects
GO

/* Query #13000 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetLastAutonumber')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetLastAutonumber
GO

/* Query #13003 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_OneAssnAgainstOneMgrRule')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_OneAssnAgainstOneMgrRule
GO

/* Query #13004 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAssnFieldsFromAssnID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAssnFieldsFromAssnID
GO

/* Query #13005 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetOneCustomFieldFromAssnID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetOneCustomFieldFromAssnID
GO

/* Query #13006 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetMgrRulesFromMgrID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetMgrRulesFromMgrID
GO

/* Query #13007 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetCFields')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetCFields
GO

/* Query #13008 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_SelectProjectsForRuleID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_SelectProjectsForRuleID
GO

/* Query #13009 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_SelectAllResources')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_SelectAllResources
GO

/* Query #13010 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_SelectResourcesForRuleID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_SelectResourcesForRuleID
GO

/* Query #13011 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_SelectARuleForRuleID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_SelectARuleForRuleID
GO

/* Query #13012 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteListItemsForRuleID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteListItemsForRuleID
GO

/* Query #13013 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_SelectListItemsForRuleID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_SelectListItemsForRuleID
GO

/* Query #13014 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteARuleForRuleID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteARuleForRuleID
GO

/* Query #13016 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_SelectDelegToResourcesForRuleID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_SelectDelegToResourcesForRuleID
GO

/* Query #13017 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetEmptyAssignment')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetEmptyAssignment
GO

/* Query #13018 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllNonworkingNames')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllNonworkingNames
GO

/* Query #13019 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetEmptyWork')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetEmptyWork
GO

/* Query #13020 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetSortedActualWorkFromAssnID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetSortedActualWorkFromAssnID
GO

/* Query #13021 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetProjectsForOwner')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetProjectsForOwner
GO

/* Query #13022 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetSubTasks')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetSubTasks
GO

/* Query #13023 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllMgrs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllMgrs
GO

/* Query #13024 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetEmptyMsg')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetEmptyMsg
GO

/* Query #13025 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetEmptyNonworking')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetEmptyNonworking
GO

/* Query #13026 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetEmptyMsgNonworking')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetEmptyMsgNonworking
GO

/* Query #13027 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetNonworkingFile')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetNonworkingFile
GO

/* Query #13028 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteMsgNonworkingFromMsgId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteMsgNonworkingFromMsgId
GO

/* Query #13029 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteNonworkingFromMsgId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteNonworkingFromMsgId
GO

/* Query #13030 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetEmptyNonworkingCategory')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetEmptyNonworkingCategory
GO

/* Query #13032 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetMgrEnabledRulesFromMgrID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetMgrEnabledRulesFromMgrID
GO

/* Query #13033 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_SelectRevertedProjectsForRuleID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_SelectRevertedProjectsForRuleID
GO

/* Query #13034 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_SelectRevertedResourcesForRuleID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_SelectRevertedResourcesForRuleID
GO

/* Query #13035 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_SelectARuleForRuleName')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_SelectARuleForRuleName
GO

/* Query #13036 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllLinks')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllLinks
GO

/* Query #13037 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllContents')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllContents
GO

/* Query #13038 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_SelectRevertedDelegToResourcesForRuleID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_SelectRevertedDelegToResourcesForRuleID
GO

/* Query #15000 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetSummaryTasksForResID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetSummaryTasksForResID
GO

/* Query #15010 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_SetResourceOffline')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_SetResourceOffline
GO

/* Query #15011 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_SetResourceOnline')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_SetResourceOnline
GO

/* Query #15012 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetOfflineFlagForResID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetOfflineFlagForResID
GO

/* Query #15099 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_InListQuery_GetCFInfoID2')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_InListQuery_GetCFInfoID2
GO

/* Query #16000 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllGanttSchemes')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllGanttSchemes
GO

/* Query #16001 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetGanttSettingsForScheme')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetGanttSettingsForScheme
GO

/* Query #16002 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAdminInfoForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAdminInfoForResId
GO

/* Query #16008 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetProjectsForViewResProjID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetProjectsForViewResProjID
GO

/* Query #16009 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ProjectViewMainFieldList')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ProjectViewMainFieldList
GO

/* Query #16010 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_TimesheetViewFieldList')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_TimesheetViewFieldList
GO

/* Query #16011 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ProjectViewAllFieldList')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ProjectViewAllFieldList
GO

/* Query #16013 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetTimesheetViewFieldList')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetTimesheetViewFieldList
GO

/* Query #16014 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllPortfolioFieldsForNewViews')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllPortfolioFieldsForNewViews
GO

/* Query #16015 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllWebclientFieldsForNewViews')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllWebclientFieldsForNewViews
GO

/* Query #16016 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllTableInfo')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllTableInfo
GO

/* Query #16017 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetViewReportsForViewID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetViewReportsForViewID
GO

/* Query #16019 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteViewReportsFieldsForViewID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteViewReportsFieldsForViewID
GO

/* Query #16020 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllProjects')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllProjects
GO

/* Query #16021 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllViewsForViewType')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllViewsForViewType
GO

/* Query #16028 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllCategories')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllCategories
GO

/* Query #16029 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetViewsResourceForResID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetViewsResourceForResID
GO

/* Query #16035 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetDSNforDSNID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetDSNforDSNID
GO

/* Query #16037 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllNonNormalViewsForType')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllNonNormalViewsForType
GO

/* Query #16038 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteViewReportCatForViewID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteViewReportCatForViewID
GO

/* Query #16039 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteViewReportsForViewID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteViewReportsForViewID
GO

/* Query #16042 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetVisibleGanttStyles')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetVisibleGanttStyles
GO

/* Query #16043 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetProjectViewInfoForViewResProjID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetProjectViewInfoForViewResProjID
GO

/* Query #16047 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetProjectAndDSN')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetProjectAndDSN
GO

/* Query #16049 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetGanttSchemesForType')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetGanttSchemesForType
GO

/* Query #16050 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteAllObsoleteNonNormalViews')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteAllObsoleteNonNormalViews
GO

/* Query #16051 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllProjectFields')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllProjectFields
GO

/* Query #16052 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllPortfolioFields')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllPortfolioFields
GO

/* Query #16053 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllWebclientFields')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllWebclientFields
GO

/* Query #16054 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_CheckConvTableForValidEntries')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_CheckConvTableForValidEntries
GO

/* Query #16059 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllProjectFieldsWOEntOutlineCodeIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllProjectFieldsWOEntOutlineCodeIDs
GO

/* Query #17000 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAdminNewAccountSetting')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAdminNewAccountSetting
GO

/* Query #17001 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAdminLogonSetting')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAdminLogonSetting
GO

/* Query #17002 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAdminWeekStartOn')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAdminWeekStartOn
GO

/* Query #17003 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAdminDelegationSetting')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAdminDelegationSetting
GO

/* Query #17004 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetEOrDResourceForResID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetEOrDResourceForResID
GO

/* Query #17005 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetEOrDResourceForResName')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetEOrDResourceForResName
GO

/* Query #17006 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteEOrDResourceForResID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteEOrDResourceForResID
GO

/* Query #17007 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_UpdateAllAssnForEOrDResID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_UpdateAllAssnForEOrDResID
GO

/* Query #17008 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_UpdateAllAssnForEOrDMgrID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_UpdateAllAssnForEOrDMgrID
GO

/* Query #17009 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_UpdateAllMsgForEOrDSenderID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_UpdateAllMsgForEOrDSenderID
GO

/* Query #17010 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_UpdateAllMsgForEOrDRecipID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_UpdateAllMsgForEOrDRecipID
GO

/* Query #17011 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_UpdateAllWorkForEOrDResID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_UpdateAllWorkForEOrDResID
GO

/* Query #17012 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_UpdateAllProjForEOrDResID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_UpdateAllProjForEOrDResID
GO

/* Query #17013 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_UpdateAllSReqForEOrDRecipID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_UpdateAllSReqForEOrDRecipID
GO

/* Query #17014 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_UpdateAllSRptForEOrDMgrID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_UpdateAllSRptForEOrDMgrID
GO

/* Query #17015 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_UpdateAllSRspForEOrDResID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_UpdateAllSRspForEOrDResID
GO

/* Query #17016 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_UpdateAllSDistribForEOrDRecipID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_UpdateAllSDistribForEOrDRecipID
GO

/* Query #17017 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteNonworkingAssignmentsForResID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteNonworkingAssignmentsForResID
GO

/* Query #17018 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DisableStatusReport')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DisableStatusReport
GO

/* Query #17019 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DisableStatusReportRequests')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DisableStatusReportRequests
GO

/* Query #17020 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteNonworkingWorkForResID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteNonworkingWorkForResID
GO

/* Query #17021 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_CheckAssignmentConflictForMerge')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_CheckAssignmentConflictForMerge
GO

/* Query #17022 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_CheckStatusResponseConflictForMerge')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_CheckStatusResponseConflictForMerge
GO

/* Query #17023 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_CheckLeadRoleConflictForMerge')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_CheckLeadRoleConflictForMerge
GO

/* Query #17024 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_CheckStatusRequestConflictForMerge')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_CheckStatusRequestConflictForMerge
GO

/* Query #17025 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetEOrDResourceForNTAccount')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetEOrDResourceForNTAccount
GO

/* Query #17027 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllActiveResIDCookies')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllActiveResIDCookies
GO

/* Query #17028 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_UpdateResourceCookiesForEOrDResID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_UpdateResourceCookiesForEOrDResID
GO

/* Query #17029 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_UpdateResourcePwdForEOrDResID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_UpdateResourcePwdForEOrDResID
GO

/* Query #17030 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DisableAllPJAccounts')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DisableAllPJAccounts
GO

/* Query #17031 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DisableAllNTAccounts')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DisableAllNTAccounts
GO

/* Query #17032 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllActivePJAccounts')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllActivePJAccounts
GO

/* Query #17033 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllActiveNTAccounts')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllActiveNTAccounts
GO

/* Query #17034 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetResIDNameForEOrDRes')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetResIDNameForEOrDRes
GO

/* Query #17100 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_UpdateAdminNewAccountSetting')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_UpdateAdminNewAccountSetting
GO

/* Query #17101 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_UpdateAdminLogonSetting')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_UpdateAdminLogonSetting
GO

/* Query #17102 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_UpdateAdminWeekStartOn')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_UpdateAdminWeekStartOn
GO

/* Query #17103 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_UpdateAdminDelegationSetting')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_UpdateAdminDelegationSetting
GO

/* Query #17201 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAssnForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAssnForResId
GO

/* Query #17202 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAssnOlderThanForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAssnOlderThanForResId
GO

/* Query #17203 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAssnSentBtwForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAssnSentBtwForResId
GO

/* Query #17204 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAssn')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAssn
GO

/* Query #17205 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAssnOlderThan')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAssnOlderThan
GO

/* Query #17206 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAssnSentBtw')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAssnSentBtw
GO

/* Query #17207 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetCompletedAssnForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetCompletedAssnForResId
GO

/* Query #17208 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetCompletedAssnOlderThanForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetCompletedAssnOlderThanForResId
GO

/* Query #17209 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetCompletedAssnSentBtwForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetCompletedAssnSentBtwForResId
GO

/* Query #17210 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetCompletedAssn')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetCompletedAssn
GO

/* Query #17211 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetCompletedAssnOlderThan')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetCompletedAssnOlderThan
GO

/* Query #17212 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetCompletedAssnSentBtw')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetCompletedAssnSentBtw
GO

/* Query #17221 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetMsgForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetMsgForResId
GO

/* Query #17222 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetMsgOlderThanForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetMsgOlderThanForResId
GO

/* Query #17223 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetMsgSentBtwForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetMsgSentBtwForResId
GO

/* Query #17224 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetMsg')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetMsg
GO

/* Query #17225 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetMsgOlderThan')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetMsgOlderThan
GO

/* Query #17226 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetMsgSentBtw')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetMsgSentBtw
GO

/* Query #17241 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetSRespForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetSRespForResId
GO

/* Query #17242 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetSRespOlderThanForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetSRespOlderThanForResId
GO

/* Query #17243 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetSRespSentBtwForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetSRespSentBtwForResId
GO

/* Query #17244 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetSResp')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetSResp
GO

/* Query #17245 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetSRespOlderThan')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetSRespOlderThan
GO

/* Query #17246 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetSRespSentBtw')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetSRespSentBtw
GO

/* Query #17306 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAdminLockDownInfo')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAdminLockDownInfo
GO

/* Query #17307 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAdminAccountSettings')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAdminAccountSettings
GO

/* Query #17308 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetOrgAcctCreationFromProjSettings')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetOrgAcctCreationFromProjSettings
GO

/* Query #17404 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_UpdateAdminLogonSettingNoPwdChg')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_UpdateAdminLogonSettingNoPwdChg
GO

/* Query #17406 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_UpdateAdminLockDownInfo')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_UpdateAdminLockDownInfo
GO

/* Query #17500 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteActualsForAssn')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteActualsForAssn
GO

/* Query #17501 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteCFForAssn')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteCFForAssn
GO

/* Query #17502 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteMsgAssnLinkForAssn')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteMsgAssnLinkForAssn
GO

/* Query #17503 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DelegationsForAssn')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DelegationsForAssn
GO

/* Query #17504 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DelegationAssnsForAssn')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DelegationAssnsForAssn
GO

/* Query #17505 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteAssnForAssn')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteAssnForAssn
GO

/* Query #17506 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteActualsForCompletedAssn')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteActualsForCompletedAssn
GO

/* Query #17507 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteCFForCompletedAssn')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteCFForCompletedAssn
GO

/* Query #17508 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteMsgAssnLinkForCompletedAssn')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteMsgAssnLinkForCompletedAssn
GO

/* Query #17509 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DelegationsForCompletedAssn')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DelegationsForCompletedAssn
GO

/* Query #17510 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DelegationAssnsForCompletedAssn')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DelegationAssnsForCompletedAssn
GO

/* Query #17511 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteAssnForCompletedAssn')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteAssnForCompletedAssn
GO

/* Query #17512 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteActualsForAssnForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteActualsForAssnForResId
GO

/* Query #17513 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteCFForAssnForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteCFForAssnForResId
GO

/* Query #17514 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteMsgAssnLinkForAssnForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteMsgAssnLinkForAssnForResId
GO

/* Query #17515 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DelegationsForAssnForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DelegationsForAssnForResId
GO

/* Query #17516 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DelegationAssnsForAssnForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DelegationAssnsForAssnForResId
GO

/* Query #17517 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteAssnForAssnForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteAssnForAssnForResId
GO

/* Query #17518 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteActualsForCompletedAssnForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteActualsForCompletedAssnForResId
GO

/* Query #17519 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteCFForCompletedAssnForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteCFForCompletedAssnForResId
GO

/* Query #17520 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteMsgAssnLinkForCompletedAssnForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteMsgAssnLinkForCompletedAssnForResId
GO

/* Query #17521 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DelegationsForCompletedAssnForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DelegationsForCompletedAssnForResId
GO

/* Query #17522 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DelegationAssnsForCompletedAssnForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DelegationAssnsForCompletedAssnForResId
GO

/* Query #17523 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteAssnForCompletedAssnForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteAssnForCompletedAssnForResId
GO

/* Query #17524 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteActualsForAssnOlderThan')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteActualsForAssnOlderThan
GO

/* Query #17525 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteCFForAssnOlderThan')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteCFForAssnOlderThan
GO

/* Query #17526 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteMsgAssnLinkForAssnOlderThan')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteMsgAssnLinkForAssnOlderThan
GO

/* Query #17527 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DelegationsForAssnOlderThan')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DelegationsForAssnOlderThan
GO

/* Query #17528 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DelegationAssnsForAssnOlderThan')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DelegationAssnsForAssnOlderThan
GO

/* Query #17529 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteAssnForAssnOlderThan')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteAssnForAssnOlderThan
GO

/* Query #17530 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteActualsForCompletedAssnOlderThan')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteActualsForCompletedAssnOlderThan
GO

/* Query #17531 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteCFForCompletedAssnOlderThan')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteCFForCompletedAssnOlderThan
GO

/* Query #17532 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteMsgAssnLinkForCompletedAssnOlderThan')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteMsgAssnLinkForCompletedAssnOlderThan
GO

/* Query #17533 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DelegationsForCompletedAssnOlderThan')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DelegationsForCompletedAssnOlderThan
GO

/* Query #17534 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DelegationAssnsForCompletedAssnOlderThan')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DelegationAssnsForCompletedAssnOlderThan
GO

/* Query #17535 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteAssnForCompletedAssnOlderThan')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteAssnForCompletedAssnOlderThan
GO

/* Query #17536 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteActualsForAssnOlderThanForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteActualsForAssnOlderThanForResId
GO

/* Query #17537 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteCFForAssnOlderThanForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteCFForAssnOlderThanForResId
GO

/* Query #17538 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteMsgAssnLinkForAssnOlderThanForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteMsgAssnLinkForAssnOlderThanForResId
GO

/* Query #17539 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DelegationsForAssnOlderThanForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DelegationsForAssnOlderThanForResId
GO

/* Query #17540 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DelegationAssnsForAssnOlderThanForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DelegationAssnsForAssnOlderThanForResId
GO

/* Query #17541 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteAssnForAssnOlderThanForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteAssnForAssnOlderThanForResId
GO

/* Query #17542 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteActualsForCompletedAssnOlderThanForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteActualsForCompletedAssnOlderThanForResId
GO

/* Query #17543 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteCFForCompletedAssnOlderThanForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteCFForCompletedAssnOlderThanForResId
GO

/* Query #17544 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteMsgAssnLinkForCompletedAssnOlderThanForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteMsgAssnLinkForCompletedAssnOlderThanForResId
GO

/* Query #17545 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DelegationsForCompletedAssnOlderThanForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DelegationsForCompletedAssnOlderThanForResId
GO

/* Query #17546 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DelegationAssnsForCompletedAssnOlderThanForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DelegationAssnsForCompletedAssnOlderThanForResId
GO

/* Query #17547 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteAssnForCompletedAssnOlderThanForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteAssnForCompletedAssnOlderThanForResId
GO

/* Query #17548 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteActualsForAssnSentBtw')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteActualsForAssnSentBtw
GO

/* Query #17549 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteCFForAssnSentBtw')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteCFForAssnSentBtw
GO

/* Query #17550 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteMsgAssnLinkForAssnSentBtw')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteMsgAssnLinkForAssnSentBtw
GO

/* Query #17551 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DelegationsForAssnSentBtw')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DelegationsForAssnSentBtw
GO

/* Query #17552 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DelegationAssnsForAssnSentBtw')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DelegationAssnsForAssnSentBtw
GO

/* Query #17553 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteAssnForAssnSentBtw')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteAssnForAssnSentBtw
GO

/* Query #17554 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteActualsForCompletedAssnSentBtw')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteActualsForCompletedAssnSentBtw
GO

/* Query #17555 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteCFForCompletedAssnSentBtw')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteCFForCompletedAssnSentBtw
GO

/* Query #17556 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteMsgAssnLinkForCompletedAssnSentBtw')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteMsgAssnLinkForCompletedAssnSentBtw
GO

/* Query #17557 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DelegationsForCompletedAssnSentBtw')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DelegationsForCompletedAssnSentBtw
GO

/* Query #17558 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DelegationAssnsForCompletedAssnSentBtw')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DelegationAssnsForCompletedAssnSentBtw
GO

/* Query #17559 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteAssnForCompletedAssnSentBtw')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteAssnForCompletedAssnSentBtw
GO

/* Query #17560 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteActualsForAssnSentBtwForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteActualsForAssnSentBtwForResId
GO

/* Query #17561 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteCFForAssnSentBtwForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteCFForAssnSentBtwForResId
GO

/* Query #17562 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteMsgAssnLinkForAssnSentBtwForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteMsgAssnLinkForAssnSentBtwForResId
GO

/* Query #17563 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DelegationsForAssnSentBtwForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DelegationsForAssnSentBtwForResId
GO

/* Query #17564 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DelegationAssnsForAssnSentBtwForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DelegationAssnsForAssnSentBtwForResId
GO

/* Query #17565 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteAssnForAssnSentBtwForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteAssnForAssnSentBtwForResId
GO

/* Query #17566 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteActualsForCompletedAssnSentBtwForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteActualsForCompletedAssnSentBtwForResId
GO

/* Query #17567 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteCFForCompletedAssnSentBtwForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteCFForCompletedAssnSentBtwForResId
GO

/* Query #17568 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteMsgAssnLinkForCompletedAssnSentBtwForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteMsgAssnLinkForCompletedAssnSentBtwForResId
GO

/* Query #17569 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DelegationsForCompletedAssnSentBtwForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DelegationsForCompletedAssnSentBtwForResId
GO

/* Query #17570 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DelegationAssnsForCompletedAssnSentBtwForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DelegationAssnsForCompletedAssnSentBtwForResId
GO

/* Query #17571 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteAssnForCompletedAssnSentBtwForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteAssnForCompletedAssnSentBtwForResId
GO

/* Query #17572 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteMsgAssnLinkForMsg')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteMsgAssnLinkForMsg
GO

/* Query #17574 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteMsgNonworkingForMsg')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteMsgNonworkingForMsg
GO

/* Query #17575 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteNonworkingForMsg')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteNonworkingForMsg
GO

/* Query #17576 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteMsgForMsg')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteMsgForMsg
GO

/* Query #17577 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteMsgAssnLinkForMsgForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteMsgAssnLinkForMsgForResId
GO

/* Query #17579 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteMsgNonworkingForMsgForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteMsgNonworkingForMsgForResId
GO

/* Query #17580 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteNonworkingForMsgForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteNonworkingForMsgForResId
GO

/* Query #17581 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteMsgForMsgForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteMsgForMsgForResId
GO

/* Query #17582 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteMsgAssnLinkForMsgOlderThan')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteMsgAssnLinkForMsgOlderThan
GO

/* Query #17584 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteMsgNonworkingForMsgOlderThan')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteMsgNonworkingForMsgOlderThan
GO

/* Query #17585 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteNonworkingForMsgOlderThan')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteNonworkingForMsgOlderThan
GO

/* Query #17586 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteMsgForMsgOlderThan')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteMsgForMsgOlderThan
GO

/* Query #17587 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteMsgAssnLinkForMsgOlderThanForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteMsgAssnLinkForMsgOlderThanForResId
GO

/* Query #17589 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteMsgNonworkingForMsgOlderThanForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteMsgNonworkingForMsgOlderThanForResId
GO

/* Query #17590 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteNonworkingForMsgOlderThanForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteNonworkingForMsgOlderThanForResId
GO

/* Query #17591 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteMsgForMsgOlderThanForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteMsgForMsgOlderThanForResId
GO

/* Query #17592 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteMsgAssnLinkForMsgSentBtw')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteMsgAssnLinkForMsgSentBtw
GO

/* Query #17594 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteMsgNonworkingForMsgSentBtw')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteMsgNonworkingForMsgSentBtw
GO

/* Query #17595 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteNonworkingForMsgSentBtw')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteNonworkingForMsgSentBtw
GO

/* Query #17596 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteMsgForMsgSentBtw')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteMsgForMsgSentBtw
GO

/* Query #17597 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteMsgAssnLinkForMsgSentBtwForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteMsgAssnLinkForMsgSentBtwForResId
GO

/* Query #17599 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteMsgNonworkingForMsgSentBtwForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteMsgNonworkingForMsgSentBtwForResId
GO

/* Query #17600 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteNonworkingForMsgSentBtwForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteNonworkingForMsgSentBtwForResId
GO

/* Query #17601 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteMsgForMsgSentBtwForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteMsgForMsgSentBtwForResId
GO

/* Query #17602 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteSDistForSResp')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteSDistForSResp
GO

/* Query #17603 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteSRespForSResp')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteSRespForSResp
GO

/* Query #17604 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteSDistForSRespForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteSDistForSRespForResId
GO

/* Query #17605 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteSRespForSRespForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteSRespForSRespForResId
GO

/* Query #17606 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteSDistForSRespOlderThan')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteSDistForSRespOlderThan
GO

/* Query #17607 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteSRespForSRespOlderThan')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteSRespForSRespOlderThan
GO

/* Query #17608 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteSDistForSRespOlderThanForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteSDistForSRespOlderThanForResId
GO

/* Query #17609 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteSRespForSRespOlderThanForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteSRespForSRespOlderThanForResId
GO

/* Query #17610 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteSDistForSRespSentBtw')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteSDistForSRespSentBtw
GO

/* Query #17611 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteSRespForSRespSentBtw')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteSRespForSRespSentBtw
GO

/* Query #17612 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteSDistForSRespSentBtwForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteSDistForSRespSentBtwForResId
GO

/* Query #17613 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteSRespForSRespSentBtwForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteSRespForSRespSentBtwForResId
GO

/* Query #17701 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_MergeUserDelegatee')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_MergeUserDelegatee
GO

/* Query #17702 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_MergeUserDelegator')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_MergeUserDelegator
GO

/* Query #17703 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_MergeUserAssignmentTeamLead')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_MergeUserAssignmentTeamLead
GO

/* Query #17704 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_MergeUserRulesManager')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_MergeUserRulesManager
GO

/* Query #17705 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_MergeUserRulesListItem')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_MergeUserRulesListItem
GO

/* Query #17706 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteTransactionsForAssn')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteTransactionsForAssn
GO

/* Query #17707 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteTransactionsForCompletedAssn')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteTransactionsForCompletedAssn
GO

/* Query #17708 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteTransactionsForAssnForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteTransactionsForAssnForResId
GO

/* Query #17709 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteTransactionsForCompletedAssnForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteTransactionsForCompletedAssnForResId
GO

/* Query #17710 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteTransactionsForAssnOlderThan')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteTransactionsForAssnOlderThan
GO

/* Query #17711 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteTransactionsForCompletedAssnOlderThan')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteTransactionsForCompletedAssnOlderThan
GO

/* Query #17712 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteTransactionsForAssnOlderThanForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteTransactionsForAssnOlderThanForResId
GO

/* Query #17713 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteTransactionsForCompletedAssnOlderThanForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteTransactionsForCompletedAssnOlderThanForResId
GO

/* Query #17714 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteTransactionsForAssnSentBtw')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteTransactionsForAssnSentBtw
GO

/* Query #17715 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteTransactionsForCompletedAssnSentBtw')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteTransactionsForCompletedAssnSentBtw
GO

/* Query #17716 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteTransactionsForAssnSentBtwForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteTransactionsForAssnSentBtwForResId
GO

/* Query #17717 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteTransactionsForCompletedAssnSentBtwForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteTransactionsForCompletedAssnSentBtwForResId
GO

/* Query #17718 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteTransactionsForAssnForProjIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteTransactionsForAssnForProjIDs
GO

/* Query #18000 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllResourcesIgnoreEnabledFlag')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllResourcesIgnoreEnabledFlag
GO

/* Query #30000 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetViewFavorites')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetViewFavorites
GO

/* Query #30001 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetColumnOrder')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetColumnOrder
GO

/* Query #30002 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetEmptyViewFavorites')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetEmptyViewFavorites
GO

/* Query #30004 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_RenameViewFavorite')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_RenameViewFavorite
GO

/* Query #30005 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetProjFavorites')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetProjFavorites
GO

/* Query #30006 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllFavorites')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllFavorites
GO

/* Query #30007 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetEmptyWebProjects')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetEmptyWebProjects
GO

/* Query #30008 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetPriorityFieldInfoID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetPriorityFieldInfoID
GO

/* Query #30015 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteTasklistTaskFromWebAssignments')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteTasklistTaskFromWebAssignments
GO

/* Query #30016 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteTasklistTaskFromWorkGroupFields')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteTasklistTaskFromWorkGroupFields
GO

/* Query #30017 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetProjIDProjectNameFromMyTaskLists')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetProjIDProjectNameFromMyTaskLists
GO

/* Query #30018 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ChangeTLOptionsInWebProjects')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ChangeTLOptionsInWebProjects
GO

/* Query #30019 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ChangeTLOptionsInWebAssignments')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ChangeTLOptionsInWebAssignments
GO

/* Query #30020 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteTLFromWebProjects')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteTLFromWebProjects
GO

/* Query #30021 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteTLFromWebAssignments')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteTLFromWebAssignments
GO

/* Query #35001 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetExistingTaskUpdateTrans')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetExistingTaskUpdateTrans
GO

/* Query #35002 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ModifyTaskUpdateTransDate')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ModifyTaskUpdateTransDate
GO

/* Query #35004 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_BUS_GetRejectedTasks')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_BUS_GetRejectedTasks
GO

/* Query #35005 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetPendingDelegationTrans')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetPendingDelegationTrans
GO

/* Query #35006 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_SetNonDelegTransStateBasedOnAction')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_SetNonDelegTransStateBasedOnAction
GO

/* Query #35008 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_UpdateDelegTrans')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_UpdateDelegTrans
GO

/* Query #35009 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetDelegTransState')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetDelegTransState
GO

/* Query #35010 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_SetTransactedNewTaskState')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_SetTransactedNewTaskState
GO

/* Query #35012 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_SetTransRejectTaskDecline')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_SetTransRejectTaskDecline
GO

/* Query #35015 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteGhostAssignsAfterDelegUpdate')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteGhostAssignsAfterDelegUpdate
GO

/* Query #35016 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_UpdateDelegationFlagForFileID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_UpdateDelegationFlagForFileID
GO

/* Query #35017 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_UpdateCreatedByResFlagForAssnIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_UpdateCreatedByResFlagForAssnIDs
GO

/* Query #35018 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_UpdateAssnDirtyFlagAndTrackingForAssnId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_UpdateAssnDirtyFlagAndTrackingForAssnId
GO

/* Query #35019 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_SetTransStateToHistory')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_SetTransStateToHistory
GO

/* Query #35020 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_UpdateAssnDirtyFlagForActuals')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_UpdateAssnDirtyFlagForActuals
GO

/* Query #35021 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_UpdateAssnDirtyFlagForCustomFields')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_UpdateAssnDirtyFlagForCustomFields
GO

/* Query #35022 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetMaxMinActualPeriodForTrans')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetMaxMinActualPeriodForTrans
GO

/* Query #35023 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAssnProjForTransRejectNotifications')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAssnProjForTransRejectNotifications
GO

/* Query #35026 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteOutdatedTransHistory')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteOutdatedTransHistory
GO

/* Query #35028 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetNumberOfPendingTransForMgr')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetNumberOfPendingTransForMgr
GO

/* Query #35029 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetRuleForRuleIDMgrID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetRuleForRuleIDMgrID
GO

/* Query #35030 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_SetTransRejectTaskUpdate')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_SetTransRejectTaskUpdate
GO

/* Query #35031 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllFromTaskUIDCheckPerm')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllFromTaskUIDCheckPerm
GO

/* Query #35032 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_CreateSummariesAndNewAssnFromOutlineNumbers')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_CreateSummariesAndNewAssnFromOutlineNumbers
GO

/* Query #46000 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetFileIDProjectNameFromFilesTaskList')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetFileIDProjectNameFromFilesTaskList
GO

/* Query #46001 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetProjectsOnlyForTLOwner')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetProjectsOnlyForTLOwner
GO

/* Query #46002 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetProjectIDNameForNewAssn')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetProjectIDNameForNewAssn
GO

/* Query #65000 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SRP_GetAllOverdueStatusReports')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SRP_GetAllOverdueStatusReports
GO

/* Query #65001 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetSelfReminders')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetSelfReminders
GO

/* Query #65002 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetMgrReminders')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetMgrReminders
GO

/* Query #65004 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetNotifications')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetNotifications
GO

/* Query #65010 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SVR_DeleteTemp')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SVR_DeleteTemp
GO

/* Query #65011 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SVR_GetReminderTemp')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SVR_GetReminderTemp
GO

/* Query #65012 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SVR_AllReminders')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SVR_AllReminders
GO

/* Query #65019 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SVR_ReminderTemp')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SVR_ReminderTemp
GO

/* Query #65020 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SVR_GetProjectName')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SVR_GetProjectName
GO

/* Query #65021 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SVR_GetResName')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SVR_GetResName
GO

/* Query #65022 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SVR_GetSRName')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SVR_GetSRName
GO

/* Query #65023 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SVR_SetNextUpdate')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SVR_SetNextUpdate
GO

/* Query #65024 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SVR_SetMsgSent')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SVR_SetMsgSent
GO

/* Query #65025 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SVR_GetReminderInfo')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SVR_GetReminderInfo
GO

/* Query #65026 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SVR_GetReminderSubjects')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SVR_GetReminderSubjects
GO

/* Query #65028 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SVR_GetReminderString')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SVR_GetReminderString
GO

/* Query #65029 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetNotificationSubscription')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetNotificationSubscription
GO

/* Query #65030 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetResEmail')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetResEmail
GO

/* Query #65034 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetENInfo')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetENInfo
GO

/* Query #65100 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetNPESchedule')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetNPESchedule
GO

/* Query #65101 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteNPESchedule')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteNPESchedule
GO

/* Query #65102 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_SetNPESchedule')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_SetNPESchedule
GO

/* Query #65103 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_UpdateNPESchedule')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_UpdateNPESchedule
GO

/* Query #65104 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_SetNPEScheduledTime')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_SetNPEScheduledTime
GO

/* Query #65200 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetEntProjectInfoForEPID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetEntProjectInfoForEPID
GO

/* Query #65201 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetEntProjectInfoForEPName')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetEntProjectInfoForEPName
GO

/* Query #66003 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetProjectCentralMenu')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetProjectCentralMenu
GO

/* Query #66004 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetOrgMenu')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetOrgMenu
GO

/* Query #66006 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetAllFeaturesAndActions')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetAllFeaturesAndActions
GO

/* Query #66007 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetAllGlobalActions')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetAllGlobalActions
GO

/* Query #66008 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetAllCategoryActions')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetAllCategoryActions
GO

/* Query #66009 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetAllGroupsAUserIsIn')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetAllGroupsAUserIsIn
GO

/* Query #66010 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetAllUsersInAGroup')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetAllUsersInAGroup
GO

/* Query #66011 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetAllActiveUsersOBName')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetAllActiveUsersOBName
GO

/* Query #66012 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetAllUsersWOAdminOBName')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetAllUsersWOAdminOBName
GO

/* Query #66013 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetAllUsersOBName')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetAllUsersOBName
GO

/* Query #66014 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetOrgAllPermissions')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetOrgAllPermissions
GO

/* Query #66015 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetSPAllGlobalPermissions')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetSPAllGlobalPermissions
GO

/* Query #66016 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetSPAllPermissionsOnCategory')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetSPAllPermissionsOnCategory
GO

/* Query #66019 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetAllGroupMembers')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetAllGroupMembers
GO

/* Query #67000 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetAllGroups')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetAllGroups
GO

/* Query #67001 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetAllCategories')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetAllCategories
GO

/* Query #67002 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetAllCatActIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetAllCatActIDs
GO

/* Query #67003 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetAllGlobalActIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetAllGlobalActIDs
GO

/* Query #67004 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetResAllGroups')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetResAllGroups
GO

/* Query #67005 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetResAllCategories')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetResAllCategories
GO

/* Query #67006 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetResInfo')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetResInfo
GO

/* Query #67007 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetResAllGlobalPermissions')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetResAllGlobalPermissions
GO

/* Query #67008 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetResAllCatPermissions')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetResAllCatPermissions
GO

/* Query #67009 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetAllActiveSPsWOAdminOBName')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetAllActiveSPsWOAdminOBName
GO

/* Query #67010 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetResCatPermByCatID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetResCatPermByCatID
GO

/* Query #67011 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetAllResources')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetAllResources
GO

/* Query #310031 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllCustomFieldsForAssnID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllCustomFieldsForAssnID
GO

/* Query #310048 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_BUS_GetStatusRequestsForResIDNotSent')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_BUS_GetStatusRequestsForResIDNotSent
GO

/* Query #310088 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_BUS_GetMatchingSRForSRID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_BUS_GetMatchingSRForSRID
GO

/* Query #310090 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_BUS_GetRequestResources')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_BUS_GetRequestResources
GO

/* Query #110223 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_BUS_GetAssnForLeadChange')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_BUS_GetAssnForLeadChange
GO

/* Query #110224 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_BUS_GetNonworkingForMsgId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_BUS_GetNonworkingForMsgId
GO

/* Query #110225 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetProjectForMgrAndRsc')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetProjectForMgrAndRsc
GO

/* Query #310226 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetNewTasksForMsgId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetNewTasksForMsgId
GO

/* Query #310227 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetResourceDelegateesLeadChange')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetResourceDelegateesLeadChange
GO

/* Query #310228 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetResourceDelegateesNoLeadChange')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetResourceDelegateesNoLeadChange
GO

/* Query #310304 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_BUS_GetTasksAssignmentsForResIdwDelegation')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_BUS_GetTasksAssignmentsForResIdwDelegation
GO

/* Query #10401 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetNewTasksCheckRules')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetNewTasksCheckRules
GO

/* Query #10402 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetStatusReqAssnsCheckRules')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetStatusReqAssnsCheckRules
GO

/* Query #10403 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetMgrsConditionRulesForStatusUpdt')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetMgrsConditionRulesForStatusUpdt
GO

/* Query #10422 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetStatusReqAssns')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetStatusReqAssns
GO

/* Query #310500 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_BUS_GetNonPendingDelegationForProjUpdate')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_BUS_GetNonPendingDelegationForProjUpdate
GO

/* Query #310502 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_BUS_UpdateDelegationFlagForFileID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_BUS_UpdateDelegationFlagForFileID
GO

/* Query #310504 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_BUS_DeleteGhostAssignsAfterDelegUpdate')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_BUS_DeleteGhostAssignsAfterDelegUpdate
GO

/* Query #310510 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_BUS_SetResourceOffline')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_BUS_SetResourceOffline
GO

/* Query #310511 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_BUS_SetResourceOnline')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_BUS_SetResourceOnline
GO

/* Query #10700 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_BUS_getNonworkingAssnsFromNonworkingIDSorted')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_BUS_getNonworkingAssnsFromNonworkingIDSorted
GO

/* Query #310702 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_BUS_SetRulesEnable')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_BUS_SetRulesEnable
GO

/* Query #110800 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_BUS_VerifyResIDForProjFileOpen')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_BUS_VerifyResIDForProjFileOpen
GO

/* Query #310801 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_BUS_GetProjPathForID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_BUS_GetProjPathForID
GO

/* Query #310802 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_BUS_GetProjPathsForIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_BUS_GetProjPathsForIDs
GO

/* Query #310803 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_BUS_GetLastSavedAdminTemplate')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_BUS_GetLastSavedAdminTemplate
GO

/* Query #311000 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_BUS_GetAdminProjectAssignmentsForResID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_BUS_GetAdminProjectAssignmentsForResID
GO

/* Query #335000 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_BUS_GetTransactionsRecords')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_BUS_GetTransactionsRecords
GO

/* Query #335004 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_BUS_GetTransactionsHistoryRecords')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_BUS_GetTransactionsHistoryRecords
GO

/* Query #135010 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_BUS_GetWeekStartOn')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_BUS_GetWeekStartOn
GO

/* Query #200000 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_AdminValidation')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_AdminValidation
GO

/* Query #200200 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_GetAllViews')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_GetAllViews
GO

/* Query #200201 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_GetFieldsForViewID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_GetFieldsForViewID
GO

/* Query #200205 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_GetAllResourcesForViews')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_GetAllResourcesForViews
GO

/* Query #200208 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_GetAllDSNsForViews')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_GetAllDSNsForViews
GO

/* Query #200209 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_GetCategoriesForViewID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_GetCategoriesForViewID
GO

/* Query #200211 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_GetGanttSchemeSettings')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_GetGanttSchemeSettings
GO

/* Query #200212 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_ChangeWSO')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_ChangeWSO
GO

/* Query #200213 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_GetFieldsForViewIDSortByFieldName')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_GetFieldsForViewIDSortByFieldName
GO

/* Query #210226 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_DeleteNonworkingAssnsForNonworkingId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_DeleteNonworkingAssnsForNonworkingId
GO

/* Query #210227 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_RenameNonworkingSummaryAssnsForNonworkingId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_RenameNonworkingSummaryAssnsForNonworkingId
GO

/* Query #210228 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_RenameNonworkingAssnsForNonworkingId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_RenameNonworkingAssnsForNonworkingId
GO

/* Query #210229 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_RenameNonworkingCategoryForNonworkingId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_RenameNonworkingCategoryForNonworkingId
GO

/* Query #210230 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_UpdateCodeForNonworkingId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_UpdateCodeForNonworkingId
GO

/* Query #210231 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_UpdateOrderForNonworkingId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_UpdateOrderForNonworkingId
GO

/* Query #210232 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_DeleteNonworkingForNonworkingId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_DeleteNonworkingForNonworkingId
GO

/* Query #210233 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_DeleteAllLinksAndContents')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_DeleteAllLinksAndContents
GO

/* Query #210236 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_DeleteNonworkingWorkForNonworkingId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_DeleteNonworkingWorkForNonworkingId
GO

/* Query #220000 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_GetAllUsersOBName')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_GetAllUsersOBName
GO

/* Query #265000 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_SecGetResourceGroups')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_SecGetResourceGroups
GO

/* Query #265001 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_SecGetResourceALLCategories')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_SecGetResourceALLCategories
GO

/* Query #265002 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_SecGetAllCategories')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_SecGetAllCategories
GO

/* Query #265003 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_SecGetProjectsForCategoryID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_SecGetProjectsForCategoryID
GO

/* Query #265004 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_SecGetProjRulesForCategoryID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_SecGetProjRulesForCategoryID
GO

/* Query #265005 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_SecGetViewsForCategoryID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_SecGetViewsForCategoryID
GO

/* Query #265006 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_SecGetUsersForCategoryID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_SecGetUsersForCategoryID
GO

/* Query #265007 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_SecGetResAssignmentsForCategoryID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_SecGetResAssignmentsForCategoryID
GO

/* Query #310021 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_BUS_SR_GetSRsForPeriod')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_BUS_SR_GetSRsForPeriod
GO

/* Query #335100 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_CHK_GetActuals')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_CHK_GetActuals
GO

/* Query #335102 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_CHK_GetNewTasks')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_CHK_GetNewTasks
GO

/* Query #335104 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_CHK_GetAllTransProjects')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_CHK_GetAllTransProjects
GO

/* Query #335105 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_CHK_SetTransStateToUpdated')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_CHK_SetTransStateToUpdated
GO


/* Query #335106 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_CHK_GetTasksUpdatesForRes')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_CHK_GetTasksUpdatesForRes
GO

/* Query #335107 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_CHK_GetAllCustomFieldsForTaskUpdates')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_CHK_GetAllCustomFieldsForTaskUpdates
GO

/* Query #335108 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_CHK_GetNonPendingDelegationForProjUpdate')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_CHK_GetNonPendingDelegationForProjUpdate
GO

/* Query #335109 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_CHK_GetAssignmentInfoForRes')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_CHK_GetAssignmentInfoForRes
GO

/* Query #335110 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_CHK_GetAllResourcesForTaskUpdates')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_CHK_GetAllResourcesForTaskUpdates
GO


/* Query #335205 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_CHK_SetTransStateToUpdatedForRules')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_CHK_SetTransStateToUpdatedForRules
GO

/* Query #335206 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_CHK_GetTasksUpdatesForResForRules')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_CHK_GetTasksUpdatesForResForRules
GO

/* Query #335207 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_CHK_GetAllCustomFieldsForTaskUpdatesForRules')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_CHK_GetAllCustomFieldsForTaskUpdatesForRules
GO

/* Query #335209 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_CHK_GetAssignmentInfoForResForRules')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_CHK_GetAssignmentInfoForResForRules
GO

/* Query #335210 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_CHK_GetAllResourcesForTaskUpdatesForRules')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_CHK_GetAllResourcesForTaskUpdatesForRules
GO

/* Query #335211 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_CHK_SetTaskUpdateTransStateToUpdatedForRules')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_CHK_SetTaskUpdateTransStateToUpdatedForRules
GO


/* Query #345000 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_BUS_GetTaskListAllFields')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_BUS_GetTaskListAllFields
GO

/* Query #16070 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetProjectViewSuccessors10')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetProjectViewSuccessors10
GO

/* Query #16071 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetProjectViewSuccessors10Ent')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetProjectViewSuccessors10Ent
GO

/* Query #16073 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetProjectViewSplits10')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetProjectViewSplits10
GO

/* Query #16074 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetProjectViewSplits10Ent')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetProjectViewSplits10Ent
GO

/* Query #16076 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetProjectViewProjectInfo10')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetProjectViewProjectInfo10
GO

/* Query #16077 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetProjectViewProjectInfo10Ent')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetProjectViewProjectInfo10Ent
GO

/* Query #30011 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllTasksForProjIDForResources')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllTasksForProjIDForResources
GO

/* Query #30012 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllTasksForProjIDForResourcesNotMe')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllTasksForProjIDForResourcesNotMe
GO

/* Query #30022 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetTLFavorites')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetTLFavorites
GO

/* Query #30023 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllTasksForProjID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllTasksForProjID
GO

/* Query #30024 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetMyProjectsAll')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetMyProjectsAll
GO

/* Query #30025 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetProjNameTaskNameFromProjIdTaskId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetProjNameTaskNameFromProjIdTaskId
GO

/* Query #30026 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllSTSServers')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllSTSServers
GO

/* Query #30027 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetCurrentSTSServerSettings')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetCurrentSTSServerSettings
GO

/* Query #30028 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_UpdateCurrentSTSServerSettings')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_UpdateCurrentSTSServerSettings
GO

/* Query #30029 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetCurrentSTSServerNameAndAdminPort')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetCurrentSTSServerNameAndAdminPort
GO

/* Query #30030 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllProjectsWithNoSubweb')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllProjectsWithNoSubweb
GO

/* Query #30031 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetProjNameFromProjId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetProjNameFromProjId
GO

/* Query #30032 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_UpdateDBCreateDeleteSubweb')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_UpdateDBCreateDeleteSubweb
GO

/* Query #30033 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetSubwebNServerNameForProjID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetSubwebNServerNameForProjID
GO

/* Query #30034 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetPublicDocsServerNSubwebName')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetPublicDocsServerNSubwebName
GO

/* Query #30035 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllTasksForProjIDForMe')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllTasksForProjIDForMe
GO

/* Query #30036 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllResourceNamesForProjID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllResourceNamesForProjID
GO

/* Query #30037 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetManagerNameForProjID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetManagerNameForProjID
GO

/* Query #35100 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetMenuInfoForPageID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetMenuInfoForPageID
GO

/* Query #40000 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetTaskNoteForDialog')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetTaskNoteForDialog
GO

/* Query #40001 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_SetCurrentTaskNote')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_SetCurrentTaskNote
GO

/* Query #40002 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_SetCurrentTaskNoteToNull')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_SetCurrentTaskNoteToNull
GO

/* Query #40003 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetTaskNoteForDialogDelegate')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetTaskNoteForDialogDelegate
GO

/* Query #40004 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_RemoveObject')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_RemoveObject
GO

/* Query #40005 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetObjectDetails')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetObjectDetails
GO

/* Query #40007 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_RemoveLink')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_RemoveLink
GO

/* Query #40009 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetProjectObjectID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetProjectObjectID
GO

/* Query #40010 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetTaskObjectID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetTaskObjectID
GO

/* Query #40012 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetProjectObjectForInsert')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetProjectObjectForInsert
GO

/* Query #40013 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetTaskObjectForInsert')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetTaskObjectForInsert
GO

/* Query #40014 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetSTSObjectID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetSTSObjectID
GO

/* Query #40015 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetSTSObjectForInsert')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetSTSObjectForInsert
GO

/* Query #40016 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetLinkedObjects')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetLinkedObjects
GO

/* Query #40017 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetLinkedObjectsOfLinkType')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetLinkedObjectsOfLinkType
GO

/* Query #40018 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetLinkedObjectsOfObjType')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetLinkedObjectsOfObjType
GO

/* Query #40019 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetLinkedObjectsOfLinkAndObjTypes')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetLinkedObjectsOfLinkAndObjTypes
GO

/* Query #40022 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllDocsForIssuesEditForm')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllDocsForIssuesEditForm
GO

/* Query #40024 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetLinkType')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetLinkType
GO

/* Query #40025 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetObjectsForRefCntUpdate')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetObjectsForRefCntUpdate
GO

/* Query #40120 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetProjectEntOutlineCodeFields')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetProjectEntOutlineCodeFields
GO

/* Query #40121 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetFiltersForViewId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetFiltersForViewId
GO

/* Query #45000 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllGroupSchemes')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllGroupSchemes
GO

/* Query #45001 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_RenameGroupScheme')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_RenameGroupScheme
GO

/* Query #45002 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetGroupSettingsForScheme')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetGroupSettingsForScheme
GO

/* Query #45003 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetDashboardURLByResID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetDashboardURLByResID
GO

/* Query #54000 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetNumPendingTransForMgr')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetNumPendingTransForMgr
GO

/* Query #54001 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetNumPendingTransForMgrAndProj')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetNumPendingTransForMgrAndProj
GO

/* Query #54002 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetNumSRForMgr')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetNumSRForMgr
GO

/* Query #54010 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetDefFileIDFromFileTimeStamp')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetDefFileIDFromFileTimeStamp
GO

/* Query #54014 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteToDoListByID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteToDoListByID
GO

/* Query #60000 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetDataSpace')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetDataSpace
GO

/* Query #60002 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_UpdateDataSpace')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_UpdateDataSpace
GO

/* Query #65005 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetNotificationAdminInfo')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetNotificationAdminInfo
GO

/* Query #65006 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_SetNotificationAdminInfo')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_SetNotificationAdminInfo
GO

/* Query #65007 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetUserEmailLanguage')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetUserEmailLanguage
GO

/* Query #65008 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_SetUserEmailLanguage')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_SetUserEmailLanguage
GO

/* Query #65009 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetInstalledLanguages')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetInstalledLanguages
GO

/* Query #65038 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetOrgMenuBar')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetOrgMenuBar
GO

/* Query #65043 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllTemplates')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllTemplates
GO

/* Query #65044 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetResNotificationsInUI')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetResNotificationsInUI
GO

/* Query #65045 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetNotificationEventsInUI')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetNotificationEventsInUI
GO

/* Query #65050 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAdminLicenses')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAdminLicenses
GO

/* Query #65051 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetActiveUsersNumber')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetActiveUsersNumber
GO

/* Query #65052 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_SetAdminLicenses')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_SetAdminLicenses
GO

/* Query #66023 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetObjectRulesByCatIDAndObjID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetObjectRulesByCatIDAndObjID
GO

/* Query #66024 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetResIDsWithGlobalPermission')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetResIDsWithGlobalPermission
GO

/* Query #66026 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetResWithDocActIDOnProject')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetResWithDocActIDOnProject
GO

/* Query #66027 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetCatOfAllProjThatAResHasDocPermission')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetCatOfAllProjThatAResHasDocPermission
GO

/* Query #66028 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetCatOfProjectsThatAResHasDocPermission')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetCatOfProjectsThatAResHasDocPermission
GO

/* Query #66031 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllPCProjects')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllPCProjects
GO

/* Query #66032 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetSecFeatureByID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetSecFeatureByID
GO

/* Query #66033 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_EnableDisableFeatureByID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_EnableDisableFeatureByID
GO

/* Query #67016 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetGroupByGrpGUID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetGroupByGrpGUID
GO

/* Query #67017 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetGroupAllCategories')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetGroupAllCategories
GO

/* Query #67018 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetAllUsersForGroup')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetAllUsersForGroup
GO

/* Query #67021 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetGroupByGrpID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetGroupByGrpID
GO

/* Query #67101 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_DeleteGroupMember')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_DeleteGroupMember
GO

/* Query #67102 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetSpCatRelation')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetSpCatRelation
GO

/* Query #67104 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_DeleteGroupMemberByResource')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_DeleteGroupMemberByResource
GO

/* Query #67105 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_DeleteGroupMemberByGroup')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_DeleteGroupMemberByGroup
GO

/* Query #67106 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_DeleteSpCatRelationsBySP')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_DeleteSpCatRelationsBySP
GO

/* Query #67107 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_DeleteSpCatPermissionsBySP')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_DeleteSpCatPermissionsBySP
GO

/* Query #67108 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetCategoryByCatID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetCategoryByCatID
GO

/* Query #67109 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_DeleteCategoryByCatID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_DeleteCategoryByCatID
GO

/* Query #67110 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_DeleteCategoryRulesByCatID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_DeleteCategoryRulesByCatID
GO

/* Query #67111 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_DeleteCategoryObjectsByCatID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_DeleteCategoryObjectsByCatID
GO

/* Query #67112 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_DeleteSpCatRelationsByCatID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_DeleteSpCatRelationsByCatID
GO

/* Query #67113 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_DeleteSpCatPermissionsByCatID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_DeleteSpCatPermissionsByCatID
GO

/* Query #67116 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetEOrDGroupByGroupName')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetEOrDGroupByGroupName
GO

/* Query #67117 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_InsertGroupMemberByResIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_InsertGroupMemberByResIDs
GO

/* Query #67119 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_DeleteGroupMembersByGrpGUID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_DeleteGroupMembersByGrpGUID
GO

/* Query #67120 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_DeleteGroupByGrpGUID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_DeleteGroupByGrpGUID
GO

/* Query #67121 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetEOrDGroupByGrpGUID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetEOrDGroupByGrpGUID
GO

/* Query #67122 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_DeleteCustomOrgMenuBar')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_DeleteCustomOrgMenuBar
GO

/* Query #67123 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_ModifyOrgMenuBar')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_ModifyOrgMenuBar
GO

/* Query #67124 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetMenuInfoByMenuID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetMenuInfoByMenuID
GO

/* Query #67125 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_DeleteCustomMenuByMenuIDAndParentID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_DeleteCustomMenuByMenuIDAndParentID
GO

/* Query #67126 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetSubMenusByMenuID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetSubMenusByMenuID
GO

/* Query #67127 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetNextMenuSeq')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetNextMenuSeq
GO

/* Query #67128 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_DeletePageForMenuByMenuID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_DeletePageForMenuByMenuID
GO

/* Query #67129 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_DeleteMenuByMenuID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_DeleteMenuByMenuID
GO

/* Query #67130 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetSubMenusForMenuByMenuID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetSubMenusForMenuByMenuID
GO

/* Query #67132 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetPageInfoByPageID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetPageInfoByPageID
GO

/* Query #67133 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetTemplateInfoByTmplID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetTemplateInfoByTmplID
GO

/* Query #67135 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_DeleteTemplatePermissionsByTmplID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_DeleteTemplatePermissionsByTmplID
GO

/* Query #67136 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_DeleteTemplateByTmplID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_DeleteTemplateByTmplID
GO

/* Query #70003 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetNumberOfPendingCalendarTransForMgr')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetNumberOfPendingCalendarTransForMgr
GO

/* Query #80000 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllResRegFields')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllResRegFields
GO

/* Query #80001 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllResRegFieldsForNewViews')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllResRegFieldsForNewViews
GO

/* Query #80002 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ResRegViewAllFieldsList')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ResRegViewAllFieldsList
GO

/* Query #80003 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetResourceCenterViewRSBasedOnFieldList')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetResourceCenterViewRSBasedOnFieldList
GO

/* Query #80004 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetResourceCenterViewInfoForViewID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetResourceCenterViewInfoForViewID
GO

/* Query #80005 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ResourceCenterViewMainFieldList')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ResourceCenterViewMainFieldList
GO

/* Query #90000 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetDefaultDataSpace')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetDefaultDataSpace
GO

/* Query #90001 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAdminSettings')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAdminSettings
GO

/* Query #90002 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_UpdateAdminTimePeriodSettings')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_UpdateAdminTimePeriodSettings
GO

/* Query #90012 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_RenameFavoriteViews')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_RenameFavoriteViews
GO

/* Query #370002 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_BUS_GetCalendarTransRecords')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_BUS_GetCalendarTransRecords
GO

/* Query #30045 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_BUS_GetUseNTLogonFlagForResID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_BUS_GetUseNTLogonFlagForResID
GO

/* Query #35500 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetOutlineCodeMasksForViews')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetOutlineCodeMasksForViews
GO

/* Query #235600 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_GetEditCustomMenuInfo')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_GetEditCustomMenuInfo
GO

/* Query #245000 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_BUS_GetGroupSchemeSettings')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_BUS_GetGroupSchemeSettings
GO

/* Query #265008 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_SecGetAllGroups')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_SecGetAllGroups
GO

/* Query #265009 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_SecGetGroupMembersByGroupID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_SecGetGroupMembersByGroupID
GO

/* Query #265010 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_SecGetGroupCategoriesByGroupID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_SecGetGroupCategoriesByGroupID
GO

/* Query #265011 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_SecGetOrgFeaturesAndActions')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_SecGetOrgFeaturesAndActions
GO

/* Query #265012 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_SecGetAllTemplates')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_SecGetAllTemplates
GO

/* Query #265013 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_SecGetAllAllowedPermissionsForTemplate')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_SecGetAllAllowedPermissionsForTemplate
GO

/* Query #265014 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_SecGetAllDeniedPermissionsForTemplate')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_SecGetAllDeniedPermissionsForTemplate
GO

/* Query #265015 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_SecGetTemplateFeaturesAndActions')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_SecGetTemplateFeaturesAndActions
GO

/* Query #265016 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_GetProjectsList')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_GetProjectsList
GO

/* Query #265017 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_GetTemplatePermissions')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_GetTemplatePermissions
GO

/* Query #265019 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_GetUserInfo')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_GetUserInfo
GO

/* Query #275000 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_AddModVision')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_AddModVision
GO

/* Query #275001 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_VisionView1')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_VisionView1
GO

/* Query #275002 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_EntVersions1')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_EntVersions1
GO

/* Query #275003 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_EntCheckin1')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_EntCheckin1
GO

/* Query #275004 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_EntCheckin2')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_EntCheckin2
GO

/* Query #275005 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_EntVersions2')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_EntVersions2
GO

/* Query #275006 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_VisionView2')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_VisionView2
GO

/* Query #345001 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_BUS_GetSelectedTaskListAllFields')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_BUS_GetSelectedTaskListAllFields
GO

/* Query #370001 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_CHK_GetAllProjsForMngId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_CHK_GetAllProjsForMngId
GO

/* Query #375001 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_CHK_VisionGetFavoriteInfo')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_CHK_VisionGetFavoriteInfo
GO

/* Query #375006 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_CHK_VisionGetViewInfo')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_CHK_VisionGetViewInfo
GO

/* Query #390000 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_CHK_GetSomeFavoriteViews')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_CHK_GetSomeFavoriteViews
GO

/* Query #390001 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_BUS_GetTransRecordsNeedApproval')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_BUS_GetTransRecordsNeedApproval
GO


/* Query #10169 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_AddNewDelegAssns')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_AddNewDelegAssns
GO

/* Query #16018 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_InsertViewReportsFields')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_InsertViewReportsFields
GO

/* Query #16044 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_InsertViewReportsCategories')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_InsertViewReportsCategories
GO

/* Query #30009 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_AddNewFieldInfoIdToWPWI')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_AddNewFieldInfoIdToWPWI
GO

/* Query #30010 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_AddWorkGroupFieldsAssignment')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_AddWorkGroupFieldsAssignment
GO

/* Query #30014 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_AddTasklistSummary')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_AddTasklistSummary
GO

/* Query #35000 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_AddNewTaskTransaction')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_AddNewTaskTransaction
GO

/* Query #60001 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_InsertDataSpace')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_InsertDataSpace
GO

/* Query #65046 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_AddNotificationRecord')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_AddNotificationRecord
GO

/* Query #67100 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_InsertGroupMember')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_InsertGroupMember
GO

/* Query #67103 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_InsertSpCatPermission')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_InsertSpCatPermission
GO

/* Query #67114 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_InsertCatgoryRulesByCatID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_InsertCatgoryRulesByCatID
GO

/* Query #67115 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_InsertCategoryObjects')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_InsertCategoryObjects
GO

/* Query #67131 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_InsertCustomMenu')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_InsertCustomMenu
GO

/* Query #67134 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_InsertNewTemplatePermissions')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_InsertNewTemplatePermissions
GO

/* Query #210234 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_InsertALink')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_InsertALink
GO

/* Query #210235 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_InsertAContent')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_InsertAContent
GO

/* Query #16003 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_RenameScheme')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_RenameScheme
GO

/* Query #40008 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetObjectID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetObjectID
GO

/* Query #40011 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetObjectForInsert')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetObjectForInsert
GO

/* Query #50010 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ViewTasks_DeleteViewTable0')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ViewTasks_DeleteViewTable0
GO

/* Query #50011 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ViewTasks_DeleteViewTable1')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ViewTasks_DeleteViewTable1
GO

/* Query #50012 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ViewTasks_DeleteViewTable2')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ViewTasks_DeleteViewTable2
GO

/* Query #50020 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ViewTasks_SelectEmptyRst0')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ViewTasks_SelectEmptyRst0
GO

/* Query #50021 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ViewTasks_SelectEmptyRst1')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ViewTasks_SelectEmptyRst1
GO

/* Query #50022 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ViewTasks_SelectEmptyRst2')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ViewTasks_SelectEmptyRst2
GO

/* Query #50110 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ViewRes_DeleteViewTable0')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ViewRes_DeleteViewTable0
GO

/* Query #50111 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ViewRes_DeleteViewTable1')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ViewRes_DeleteViewTable1
GO

/* Query #50112 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ViewRes_DeleteViewTable2')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ViewRes_DeleteViewTable2
GO

/* Query #50120 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ViewRes_SelectEmptyRst0')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ViewRes_SelectEmptyRst0
GO

/* Query #50121 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ViewRes_SelectEmptyRst1')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ViewRes_SelectEmptyRst1
GO

/* Query #50122 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ViewRes_SelectEmptyRst2')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ViewRes_SelectEmptyRst2
GO

/* Query #50210 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ViewAssn_DeleteViewTable0')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ViewAssn_DeleteViewTable0
GO

/* Query #50211 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ViewAssn_DeleteViewTable1')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ViewAssn_DeleteViewTable1
GO

/* Query #50212 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ViewAssn_DeleteViewTable2')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ViewAssn_DeleteViewTable2
GO

/* Query #50220 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ViewAssn_SelectEmptyRst0')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ViewAssn_SelectEmptyRst0
GO

/* Query #50221 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ViewAssn_SelectEmptyRst1')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ViewAssn_SelectEmptyRst1
GO

/* Query #50222 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ViewAssn_SelectEmptyRst2')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ViewAssn_SelectEmptyRst2
GO

/* Query #50310 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ViewProject_DeleteViewTable0')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ViewProject_DeleteViewTable0
GO

/* Query #50311 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ViewProject_DeleteViewTable1')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ViewProject_DeleteViewTable1
GO

/* Query #50320 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ViewProject_SelectEmptyRst0')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ViewProject_SelectEmptyRst0
GO

/* Query #50321 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ViewProject_SelectEmptyRst1')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ViewProject_SelectEmptyRst1
GO

/* Query #50410 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ViewTaskSplits_DeleteViewTable0')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ViewTaskSplits_DeleteViewTable0
GO

/* Query #50420 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ViewTaskSplits_SelectEmptyRst0')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ViewTaskSplits_SelectEmptyRst0
GO

/* Query #50510 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ViewPredecessors_DeleteViewTable0')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ViewPredecessors_DeleteViewTable0
GO

/* Query #50520 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ViewPredecessors_SelectEmptyRst0')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ViewPredecessors_SelectEmptyRst0
GO

/* Query #50610 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ViewSuccessors_DeleteViewTable0')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ViewSuccessors_DeleteViewTable0
GO

/* Query #50620 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ViewSuccessors_SelectEmptyRst0')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ViewSuccessors_SelectEmptyRst0
GO

/* Query #50710 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ViewAssignmentTimephasedByDay_DeleteViewTable0')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ViewAssignmentTimephasedByDay_DeleteViewTable0
GO

/* Query #50720 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ViewAssignmentTimephasedByDay_SelectEmptyRst0')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ViewAssignmentTimephasedByDay_SelectEmptyRst0
GO

/* Query #51010 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ViewEntRes_DeleteViewTable0')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ViewEntRes_DeleteViewTable0
GO

/* Query #51011 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ViewEntRes_DeleteViewTable1')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ViewEntRes_DeleteViewTable1
GO

/* Query #51012 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ViewEntRes_DeleteViewTable2')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ViewEntRes_DeleteViewTable2
GO

/* Query #51020 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ViewEntRes_SelectEmptyRst0')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ViewEntRes_SelectEmptyRst0
GO

/* Query #51021 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ViewEntRes_SelectEmptyRst1')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ViewEntRes_SelectEmptyRst1
GO

/* Query #51022 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ViewEntRes_SelectEmptyRst2')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ViewEntRes_SelectEmptyRst2
GO

/* Query #51110 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ViewResourceAssignmentByDay_DeleteViewTable0')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ViewResourceAssignmentByDay_DeleteViewTable0
GO

/* Query #51120 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ViewResourceAssignmentByDay_SelectEmptyRst0')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ViewResourceAssignmentByDay_SelectEmptyRst0
GO

/* Query #54011 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetProjDBIDFromEntProjID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetProjDBIDFromEntProjID
GO

/* Query #35501 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetOutlineCodesForViews')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetOutlineCodesForViews
GO

/* Query #35502 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetOutlineCodeMasksForTasks')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetOutlineCodeMasksForTasks
GO

/* Query #35503 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetOutlineCodesForTasks')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetOutlineCodesForTasks
GO

/* Query #75000 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_CubeSettings')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_CubeSettings
GO

/* Query #75001 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_VisionViewsXML')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_VisionViewsXML
GO

/* Query #75002 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_ENT_Mode')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_ENT_Mode
GO

/* Query #75003 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_ENT_Settings')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_ENT_Settings
GO

/* Query #75004 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_VSN_Currency_Format')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_VSN_Currency_Format
GO

/* Query #85000 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_GetModels')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_GetModels
GO

/* Query #85001 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_GetModelDetails')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_GetModelDetails
GO

/* Query #85002 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_GetProjects')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_GetProjects
GO

/* Query #85003 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_GetResources')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_GetResources
GO

/* Query #85004 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_GetProjUIDByType')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_GetProjUIDByType
GO

/* Query #85005 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_GetProjResList')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_GetProjResList
GO

/* Query #85006 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_GetProjResListByVersion')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_GetProjResListByVersion
GO

/* Query #85007 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_GetCPLinks')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_GetCPLinks
GO

/* Query #85008 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_GetUIDForProjName')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_GetUIDForProjName
GO

/* Query #85009 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_GetProjNameForUID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_GetProjNameForUID
GO

/* Query #85010 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_GetLastIdentityValue')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_GetLastIdentityValue
GO

/* Query #85011 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_GetProjHeader')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_GetProjHeader
GO

/* Query #85014 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_GetOutlcodesForProject')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_GetOutlcodesForProject
GO

/* Query #85017 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_GetRBSnames')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_GetRBSnames
GO

/* Query #85053 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_GetViewProjRes')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_GetViewProjRes
GO

/* Query #85056 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_GetViewProjAssns')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_GetViewProjAssns
GO

/* Query #30038 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetSubwebSvrSTSUserPasswdForProjID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetSubwebSvrSTSUserPasswdForProjID
GO

/* Query #40026 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllTasksForIssuesEditForm')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllTasksForIssuesEditForm
GO

/* Query #40040 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllTasksForIssuesEditFormForResources')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllTasksForIssuesEditFormForResources
GO

/* Query #40041 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllTasksForIssuesEditFormForResourcesNotMe')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllTasksForIssuesEditFormForResourcesNotMe
GO

/* Query #40043 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllTasksForIssuesEditFormForMe')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllTasksForIssuesEditFormForMe
GO

/* Query #85018 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_DeleteModel')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_DeleteModel
GO

/* Query #85020 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_GetSpecificRBSName')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_GetSpecificRBSName
GO

/* Query #85058 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_GetViewProjCal')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_GetViewProjCal
GO

/* Query #365000 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_BUS_GetToDoListXMLInfo')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_BUS_GetToDoListXMLInfo
GO

/* Query #10025 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetDistinctResInfoForAssnId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetDistinctResInfoForAssnId
GO

/* Query #10026 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetDistinctMgrResInfoForAssnId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetDistinctMgrResInfoForAssnId
GO

/* Query #10029 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetBatchCustomFieldsForAssnIDFieldID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetBatchCustomFieldsForAssnIDFieldID
GO

/* Query #10050 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAssnCreatedByResForProjList')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAssnCreatedByResForProjList
GO

/* Query #10052 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_SelectedNewTasksCreatedByResForMgr')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_SelectedNewTasksCreatedByResForMgr
GO

/* Query #10080 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetMsgIDFromList')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetMsgIDFromList
GO

/* Query #10084 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetRequestsNotInList')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetRequestsNotInList
GO

/* Query #10114 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetActualsForResID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetActualsForResID
GO

/* Query #10120 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteBatchActualsForAssnIDAndType')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteBatchActualsForAssnIDAndType
GO

/* Query #10122 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetCFInfoForFieldID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetCFInfoForFieldID
GO

/* Query #10123 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetMsgIDForResID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetMsgIDForResID
GO

/* Query #10130 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetBatchAllAssnForFileIdAssnProjIdNoResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetBatchAllAssnForFileIdAssnProjIdNoResId
GO

/* Query #10131 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetBatchAllAssnForFileIdAssnIdNoResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetBatchAllAssnForFileIdAssnIdNoResId
GO

/* Query #10132 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetBatchAllAssnForFileIdAssnProjIdOrAssnIdNoResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetBatchAllAssnForFileIdAssnProjIdOrAssnIdNoResId
GO

/* Query #10133 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetBatchAllAssnForFileIdAssnProjId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetBatchAllAssnForFileIdAssnProjId
GO

/* Query #10134 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetBatchAllAssnForFileIdAssnId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetBatchAllAssnForFileIdAssnId
GO

/* Query #10135 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetBatchAllAssnForFileIdAssnProjIdOrAssnId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetBatchAllAssnForFileIdAssnProjIdOrAssnId
GO

/* Query #10138 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteProjectCFInfoForFileIDAndCFIds')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteProjectCFInfoForFileIDAndCFIds
GO

/* Query #10167 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_RemoveFromTasksPage')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_RemoveFromTasksPage
GO

/* Query #10168 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_UpdateOldDelegKeepCopys')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_UpdateOldDelegKeepCopys
GO

/* Query #10170 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAssnFromList')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAssnFromList
GO

/* Query #10178 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetDistinctDelegMsgResInfoForAssnID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetDistinctDelegMsgResInfoForAssnID
GO

/* Query #10186 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetDistinctProjectsForAssnIDList')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetDistinctProjectsForAssnIDList
GO

/* Query #10187 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetDistinctResourcesForAssnIDList')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetDistinctResourcesForAssnIDList
GO

/* Query #10188 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetLeadAssignmentsForAssnList')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetLeadAssignmentsForAssnList
GO

/* Query #10191 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetDistinctResourcesForLeadChange')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetDistinctResourcesForLeadChange
GO

/* Query #10192 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetDistinctManagersForDelegation')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetDistinctManagersForDelegation
GO

/* Query #10193 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetDistinctTeamLeadResInfoForAssnId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetDistinctTeamLeadResInfoForAssnId
GO

/* Query #10194 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAssnsFromListOrderByResID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAssnsFromListOrderByResID
GO

/* Query #10195 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAssnsFromListOrderByResIDTeamLead')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAssnsFromListOrderByResIDTeamLead
GO

/* Query #10196 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAssnsFromListOrderByResIDMgr')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAssnsFromListOrderByResIDMgr
GO

/* Query #10198 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_SelectTasksToDelegate')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_SelectTasksToDelegate
GO

/* Query #10199 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_SelectResNameFromResList')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_SelectResNameFromResList
GO

/* Query #13001 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetNewTasksFromAssnID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetNewTasksFromAssnID
GO

/* Query #13002 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAcceptedTasksFromAssnID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAcceptedTasksFromAssnID
GO

/* Query #15001 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetLeafTasksForListOfSumTasks')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetLeafTasksForListOfSumTasks
GO

/* Query #15002 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteListOfAssignmentsFromAssnTable')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteListOfAssignmentsFromAssnTable
GO

/* Query #15003 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteListOfAssignMsgFromMsgAssnTable')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteListOfAssignMsgFromMsgAssnTable
GO

/* Query #15004 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetLeafTasksForListOfSumTasksWDeleg')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetLeafTasksForListOfSumTasksWDeleg
GO

/* Query #15020 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ReQueryAssnsForManualMerging')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ReQueryAssnsForManualMerging
GO

/* Query #15021 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ReQueryCustomsForManualMerging')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ReQueryCustomsForManualMerging
GO

/* Query #15022 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetActualsForIntegrityCheck')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetActualsForIntegrityCheck
GO

/* Query #15023 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetConflictNames')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetConflictNames
GO

/* Query #15024 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ReQueryApprovalForManualMerging')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ReQueryApprovalForManualMerging
GO


/* Query #16036 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteAllObsoleteNonNormalViewsWExceptions')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteAllObsoleteNonNormalViewsWExceptions
GO

/* Query #16057 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_WebclientViewAllFieldList')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_WebclientViewAllFieldList
GO

/* Query #16058 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetEOrDViewByViewNameAndType')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetEOrDViewByViewNameAndType
GO

/* Query #17213 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteAssnForAssnIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteAssnForAssnIDs
GO

/* Query #17214 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteActualsForAssnIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteActualsForAssnIDs
GO

/* Query #17215 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteCFForAssnIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteCFForAssnIDs
GO

/* Query #17216 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteMsgAssnLinkForAssnIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteMsgAssnLinkForAssnIDs
GO

/* Query #17217 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DelegationsForAssnIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DelegationsForAssnIDs
GO

/* Query #17218 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DelegationAssnsForAssnIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DelegationAssnsForAssnIDs
GO

/* Query #17231 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteMsgForMsgIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteMsgForMsgIDs
GO

/* Query #17232 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteMsgAssnLinkForMsgIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteMsgAssnLinkForMsgIDs
GO

/* Query #17234 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteMsgNonworkingForMsgIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteMsgNonworkingForMsgIDs
GO

/* Query #17235 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteNonworkingForMsgIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteNonworkingForMsgIDs
GO

/* Query #17251 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteSRespForSRespIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteSRespForSRespIDs
GO

/* Query #17252 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteSDistForSRespIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteSDistForSRespIDs
GO

/* Query #17261 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetProjForProjNames')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetProjForProjNames
GO

/* Query #17262 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAssnForProjIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAssnForProjIDs
GO

/* Query #17263 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetMsgForProjIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetMsgForProjIDs
GO

/* Query #17271 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteProjRecordForProjIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteProjRecordForProjIDs
GO

/* Query #17273 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteProjCategoriesForProjIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteProjCategoriesForProjIDs
GO

/* Query #17274 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteRuleItemsForProjIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteRuleItemsForProjIDs
GO

/* Query #17275 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteViewTableEntriesForProjIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteViewTableEntriesForProjIDs
GO

/* Query #17614 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteActualsForAssnForProjIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteActualsForAssnForProjIDs
GO

/* Query #17615 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteCFForAssnForProjIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteCFForAssnForProjIDs
GO

/* Query #17616 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteMsgAssnLinkForAssnForProjIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteMsgAssnLinkForAssnForProjIDs
GO

/* Query #17617 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DelegationsForAssnForProjIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DelegationsForAssnForProjIDs
GO

/* Query #17618 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DelegationAssnsForAssnForProjIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DelegationAssnsForAssnForProjIDs
GO

/* Query #17619 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteAssnForAssnForProjIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteAssnForAssnForProjIDs
GO

/* Query #17620 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteMsgAssnLinkForMsgForProjIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteMsgAssnLinkForMsgForProjIDs
GO

/* Query #17622 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteMsgNonworkingForMsgForProjIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteMsgNonworkingForMsgForProjIDs
GO

/* Query #17623 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteNonworkingForMsgForProjIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteNonworkingForMsgForProjIDs
GO

/* Query #17624 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteMsgForMsgForProjIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteMsgForMsgForProjIDs
GO

/* Query #17625 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteTransactionsForProjIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteTransactionsForProjIDs
GO

/* Query #17626 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteTransactions')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteTransactions
GO

/* Query #17627 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteTransactionsForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteTransactionsForResId
GO

/* Query #17628 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteTransactionsOlderThan')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteTransactionsOlderThan
GO

/* Query #17629 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteTransactionsOlderThanForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteTransactionsOlderThanForResId
GO

/* Query #17630 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteTransactionsSentBtw')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteTransactionsSentBtw
GO

/* Query #17631 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteTransactionsSentBtwForResId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteTransactionsSentBtwForResId
GO


/* Query #30003 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteViewFavorite')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteViewFavorite
GO

/* Query #35007 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetRejectAssignments')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetRejectAssignments
GO

/* Query #35011 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeclineAssignedTask')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeclineAssignedTask
GO

/* Query #35013 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetSelectedTasksIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetSelectedTasksIDs
GO

/* Query #35014 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetSelectedTasksThatIReportToLeads')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetSelectedTasksThatIReportToLeads
GO

/* Query #35024 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetDelegatorContentForNotifications')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetDelegatorContentForNotifications
GO

/* Query #35025 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetDelegateeContentForNotifications')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetDelegateeContentForNotifications
GO

/* Query #35027 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetNumTaskUpdatesAndManagerNames')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetNumTaskUpdatesAndManagerNames
GO

/* Query #35200 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetTodoListsForNotification')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetTodoListsForNotification
GO

/* Query #40020 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetTaskObjects')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetTaskObjects
GO

/* Query #40023 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllIssuesForIssuesEditForm')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllIssuesForIssuesEditForm
GO

/* Query #40028 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_SetLinkType')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_SetLinkType
GO

/* Query #40029 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetProjectIssues')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetProjectIssues
GO

/* Query #65031 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetENTasks')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetENTasks
GO

/* Query #65032 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetENDelegationTasks')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetENDelegationTasks
GO

/* Query #65033 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetENStatusReports')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetENStatusReports
GO

/* Query #65035 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetENStrings')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetENStrings
GO

/* Query #65041 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetENDelegationTasksWLeadResInfo')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetENDelegationTasksWLeadResInfo
GO

/* Query #65042 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetENCalendarTransactionsInfo')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetENCalendarTransactionsInfo
GO

/* Query #66025 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetResourceInfoFromResIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetResourceInfoFromResIDs
GO

/* Query #66029 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetProjectsExceptInCategoryList')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetProjectsExceptInCategoryList
GO

/* Query #66030 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetProjectsInCategoriesAllowedMinusDenied')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetProjectsInCategoriesAllowedMinusDenied
GO

/* Query #66036 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetWRESIDsFromEUIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetWRESIDsFromEUIDs
GO

/* Query #66037 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetIssueProjectInfoFromProjList')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetIssueProjectInfoFromProjList
GO

/* Query #66038 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_DeleteResSecurityInfo')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_DeleteResSecurityInfo
GO

/* Query #66040 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_CheckResInSecGroupByGrpID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_CheckResInSecGroupByGrpID
GO

/* Query #66042 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetEnterpriseResIDsFromWResIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetEnterpriseResIDsFromWResIDs
GO

/* Query #66043 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetEnterpriseProjIDsFromWProjIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetEnterpriseProjIDsFromWProjIDs
GO

/* Query #66044 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_MergeResourcesInfoForEOrDResID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_MergeResourcesInfoForEOrDResID
GO

/* Query #66045 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetGroupsForResByResID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetGroupsForResByResID
GO

/* Query #66049 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetAllEntUsersOBName')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetAllEntUsersOBName
GO

/* Query #66050 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_CheckUserInGroupByGUID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_CheckUserInGroupByGUID
GO

/* Query #70000 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_BUS_DeleteCalendarTransMessages')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_BUS_DeleteCalendarTransMessages
GO

/* Query #70001 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_BUS_DeleteCalendarTransNonWorking')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_BUS_DeleteCalendarTransNonWorking
GO

/* Query #70002 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_BUS_DeleteCalendarTransMessagesNonWorking')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_BUS_DeleteCalendarTransMessagesNonWorking
GO

/* Query #90005 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetActualsRecordset')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetActualsRecordset
GO

/* Query #90006 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetCustomfieldRecordset')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetCustomfieldRecordset
GO

/* Query #90007 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetCustomfieldInfoRecordset')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetCustomfieldInfoRecordset
GO

/* Query #90008 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetCustomfieldRecordsetForViews')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetCustomfieldRecordsetForViews
GO

/* Query #90009 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetCustomfieldInfoRecordsetForViews')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetCustomfieldInfoRecordsetForViews
GO

/* Query #90010 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetFavoriteViews')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetFavoriteViews
GO

/* Query #90011 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteFavoriteViews')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteFavoriteViews
GO

/* Query #90029 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetTransActualsRS')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetTransActualsRS
GO

/* Query #90030 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ClearApprovalDirtyFlagForActuals')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ClearApprovalDirtyFlagForActuals
GO

/* Query #85012 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_GetPoolResCalendars')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_GetPoolResCalendars
GO

/* Query #85013 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_GetPoolResources')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_GetPoolResources
GO

/* Query #85016 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_GetEntResUIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_GetEntResUIDs
GO

/* Query #85019 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_GetResNames')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_GetResNames
GO

/* Query #310213 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_BUS_GetTasksAssignmentsForAssnIDList')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_BUS_GetTasksAssignmentsForAssnIDList
GO

/* Query #310308 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_BUS_GetLeadAssignmentsForAssnList')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_BUS_GetLeadAssignmentsForAssnList
GO

/* Query #110309 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_BUS_GetLeadActualsForAssnList')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_BUS_GetLeadActualsForAssnList
GO

/* Query #110310 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_BUS_GetCustomFieldsForAssnList')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_BUS_GetCustomFieldsForAssnList
GO

/* Query #110311 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_BUS_GetDistinctCFInfoIDsForAssnList')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_BUS_GetDistinctCFInfoIDsForAssnList
GO

/* Query #10404 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetStatusReqAssnsFailedCheckRules')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetStatusReqAssnsFailedCheckRules
GO

/* Query #310405 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_BUS_UpdateCreatedByResFlagForAssnIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_BUS_UpdateCreatedByResFlagForAssnIDs
GO

/* Query #335800 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_BUS_GetResGraphMainRecords')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_BUS_GetResGraphMainRecords
GO

/* Query #335801 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_BUS_GetResGraphTimephasedRecords')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_BUS_GetResGraphTimephasedRecords
GO

/* Query #335111 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_CHK_SetTaskUpdateTransStateToUpdated')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_CHK_SetTaskUpdateTransStateToUpdated
GO


/* Query #335112 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_BUS_UpdateAssnDirtyFlagTrackingForAssnId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_BUS_UpdateAssnDirtyFlagTrackingForAssnId
GO

/* Query #335113 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_CHK_GetActualsInfoAssnList')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_CHK_GetActualsInfoAssnList
GO


/* Query #335115 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_CHK_GetAllCustomFieldsForAssnList')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_CHK_GetAllCustomFieldsForAssnList
GO

/* Query #335116 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_CHK_MoveCurrentNotesToHistoryOnTransUpdate')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_CHK_MoveCurrentNotesToHistoryOnTransUpdate
GO

/* Query #335117 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_CHK_MoveCurrentNotesToHistoryForTransType')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_CHK_MoveCurrentNotesToHistoryForTransType
GO

/* Query #335118 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_CHK_UpdateAssnDirtyFlagForActualsForP2000')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_CHK_UpdateAssnDirtyFlagForActualsForP2000
GO

/* Query #335119 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_CHK_UpdateAssnDirtyFlagForCustomFieldsForP2000')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_CHK_UpdateAssnDirtyFlagForCustomFieldsForP2000
GO

/* Query #335120 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_CHK_GetResCheckedOutProjectsByResID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_CHK_GetResCheckedOutProjectsByResID
GO

/* Query #335121 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_GetResAdminProjectsByResID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_GetResAdminProjectsByResID
GO

/* Query #335122 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_CHK_GetProjectTasksForProjID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_CHK_GetProjectTasksForProjID
GO

/* Query #370000 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_CHK_GetCalendarTransRecords')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_CHK_GetCalendarTransRecords
GO

/* Query #65054 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetResIDFromGUID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetResIDFromGUID
GO

/* Query #65055 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_CheckSOInCategoryList')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_CheckSOInCategoryList
GO

/* Query #65056 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_CheckResHasAssignmentFromMgr')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_CheckResHasAssignmentFromMgr
GO

/* Query #65057 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_AddNewTAResourceAsManager')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_AddNewTAResourceAsManager
GO

/* Query #65058 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_AddNewTAResourceAsMember')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_AddNewTAResourceAsMember
GO

/* Query #65059 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_CopyInsertNewTemplatePermissions')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_CopyInsertNewTemplatePermissions
GO

/* Query #65060 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_AddResToProjectManagers')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_AddResToProjectManagers
GO

/* Query #65061 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_AddResToTeamMembers')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_AddResToTeamMembers
GO

/* Query #65070 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetSPsForCategoryID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetSPsForCategoryID
GO

/* Query #65071 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetResAssignmentsForCategoryID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetResAssignmentsForCategoryID
GO

/* Query #65072 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetSPListedGlobalPermissionSettings')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetSPListedGlobalPermissionSettings
GO

/* Query #35300 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetReportNameFromResponseID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetReportNameFromResponseID
GO

/* Query #40031 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetResAndMgrForProjId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetResAndMgrForProjId
GO

/* Query #40032 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetResNameFromId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetResNameFromId
GO

/* Query #40036 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteStsServer')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteStsServer
GO

/* Query #65047 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetEntProjIDFromProjDBID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetEntProjIDFromProjDBID
GO

/* Query #330000 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllProjsSubwebNamesSTSServerNames')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllProjsSubwebNamesSTSServerNames
GO

/* Query #54012 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetFileIdFromPathOwnerAndEntProjID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetFileIdFromPathOwnerAndEntProjID
GO

/* Query #30040 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetDocLibDocObjIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetDocLibDocObjIDs
GO

/* Query #30041 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_RemoveAllProjectLinks')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_RemoveAllProjectLinks
GO

/* Query #30042 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_RemoveAllProjectObjects')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_RemoveAllProjectObjects
GO

/* Query #35400 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetOutlineCodeMasksForViewID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetOutlineCodeMasksForViewID
GO

/* Query #35401 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetOutlineCodeValuesForViewID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetOutlineCodeValuesForViewID
GO

/* Query #40027 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetMyProjectsForIssuesMainPage')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetMyProjectsForIssuesMainPage
GO

/* Query #85015 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_GetProjectNamesForIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_GetProjectNamesForIDs
GO

/* Query #90015 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetViewTimeStamp')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetViewTimeStamp
GO

/* Query #90016 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_CompareGUIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_CompareGUIDs
GO

/* Query #90019 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetEntCustomField')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetEntCustomField
GO

/* Query #90022 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_UpdateTimePeriod_Start')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_UpdateTimePeriod_Start
GO

/* Query #90024 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_UpdateTimePeriod_Finish')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_UpdateTimePeriod_Finish
GO

/* Query #30013 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllProjectsWithSubwebConfigured')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllProjectsWithSubwebConfigured
GO

/* Query #30043 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetPublicDocsServerAllInfo')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetPublicDocsServerAllInfo
GO

/* Query #30044 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_UpdatePortalSettings')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_UpdatePortalSettings
GO

/* Query #30046 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_UpdateLastSTSAdminSynchTime')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_UpdateLastSTSAdminSynchTime
GO

/* Query #30047 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetLastSTSAdminSynchTime')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetLastSTSAdminSynchTime
GO

/* Query #30048 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetResourceNamesFromIds')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetResourceNamesFromIds
GO

/* Query #30049 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAddUserListForSTSManagerRole')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAddUserListForSTSManagerRole
GO

/* Query #30050 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAddUserListForSTSTeamMemberRole')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAddUserListForSTSTeamMemberRole
GO

/* Query #30051 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetRemoveUserListFromSTSRoles')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetRemoveUserListFromSTSRoles
GO

/* Query #30052 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetProjectsAllResIsManager')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetProjectsAllResIsManager
GO

/* Query #30053 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetProjectsAllResIsTeamMember')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetProjectsAllResIsTeamMember
GO

/* Query #30054 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetProjectStsSiteCount')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetProjectStsSiteCount
GO

/* Query #30055 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetResEmailFromResNTAccountName')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetResEmailFromResNTAccountName
GO

/* Query #30056 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetObjIDListGUIDForProjId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetObjIDListGUIDForProjId
GO

/* Query #30057 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllProjsWithSubwebs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllProjsWithSubwebs
GO

/* Query #30058 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetResIDsForAssnIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetResIDsForAssnIDs
GO

/* Query #30059 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllActiveNTUsers')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllActiveNTUsers
GO

/* Query #30061 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetPublishedProjCountForProjId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetPublishedProjCountForProjId
GO

/* Query #30062 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetTDLDefaultStartNFinishTimes')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetTDLDefaultStartNFinishTimes
GO

/* Query #30063 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_AddTDLStartNFinishRollupInfo')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_AddTDLStartNFinishRollupInfo
GO

/* Query #30064 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetEmptyWebStsServers')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetEmptyWebStsServers
GO

/* Query #30065 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetSTSGeneralSettings')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetSTSGeneralSettings
GO

/* Query #30067 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetResWSSOperationValidatorGUID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetResWSSOperationValidatorGUID
GO

/* Query #30068 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_UpdateServerIdForMigratedProjects')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_UpdateServerIdForMigratedProjects
GO

/* Query #30069 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllProjectCountWithSites')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllProjectCountWithSites
GO

/* Query #30070 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetWSSSiteVariableValues')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetWSSSiteVariableValues
GO


/* Query #30072 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetExistingFavByName')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetExistingFavByName
GO

/* Query #30073 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetLastWSSListsSyncTimes')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetLastWSSListsSyncTimes
GO

/* Query #30074 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_SetLastWSSListsSyncTimes')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_SetLastWSSListsSyncTimes
GO

/* Query #30075 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetIsHostedOrg')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetIsHostedOrg
GO

/* Query #30076 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetPSWSSObjectLinkPermissionsForProject')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetPSWSSObjectLinkPermissionsForProject
GO

/* Query #35301 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_UpdateSRRequestDueDate')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_UpdateSRRequestDueDate
GO

/* Query #40033 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetStatusResponsesForSRID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetStatusResponsesForSRID
GO

/* Query #40035 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_UpdateStsServer')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_UpdateStsServer
GO

/* Query #40037 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ResetCurrentAndPubDocsStsServers')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ResetCurrentAndPubDocsStsServers
GO

/* Query #40038 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetStsObjectIdFromTpId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetStsObjectIdFromTpId
GO

/* Query #40042 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetPublicDocsSubwebName')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetPublicDocsSubwebName
GO

/* Query #40049 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetSrResponceFromRespId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetSrResponceFromRespId
GO

/* Query #40050 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllSrResponcesFromUpdateStatus')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllSrResponcesFromUpdateStatus
GO

/* Query #40051 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetUpdateStatusFromRespId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetUpdateStatusFromRespId
GO

/* Query #40052 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetSRespForSRID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetSRespForSRID
GO

/* Query #40053 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteAllSRRespForSRID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteAllSRRespForSRID
GO

/* Query #40054 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_DeleteSDistForSRespForSRID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteSDistForSRespForSRID
GO

/* Query #40055 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_StsGetObjectIdsForDeletedTasks')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_StsGetObjectIdsForDeletedTasks
GO

/* Query #40057 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_StsDeleteObject')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_StsDeleteObject
GO

/* Query #40058 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_StsUpdateOtherRefCnt')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_StsUpdateOtherRefCnt
GO

/* Query #40059 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_StsDeleteAllLinksForMultipleObjects')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_StsDeleteAllLinksForMultipleObjects
GO

/* Query #40060 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_StsDeleteObjectsForMultipleObjects')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_StsDeleteObjectsForMultipleObjects
GO

/* Query #40100 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetEROCDefaultNames')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetEROCDefaultNames
GO

/* Query #50810 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ViewTaskTimephasedByDay_DeleteViewTable0')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ViewTaskTimephasedByDay_DeleteViewTable0
GO

/* Query #50820 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ViewTaskTimephasedByDay_SelectEmptyRst0')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ViewTaskTimephasedByDay_SelectEmptyRst0
GO

/* Query #50850 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ViewCalendars_DeleteViewTable0')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ViewCalendars_DeleteViewTable0
GO

/* Query #50860 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ViewCalendars_SelectEmptyRst0')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ViewCalendars_SelectEmptyRst0
GO

/* Query #50890 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ViewCalendarData_DeleteViewTable0')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ViewCalendarData_DeleteViewTable0
GO

/* Query #50900 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ViewCalendarData_SelectEmptyRst0')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ViewCalendarData_SelectEmptyRst0
GO

/* Query #50930 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ViewCalendarExceptions_DeleteViewTable0')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ViewCalendarExceptions_DeleteViewTable0
GO

/* Query #50940 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_ViewCalendarExceptions_SelectEmptyRst0')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_ViewCalendarExceptions_SelectEmptyRst0
GO

/* Query #54013 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetProjIDForToDoListID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetProjIDForToDoListID
GO

/* Query #54015 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAssnIDForResIDAndForProjID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAssnIDForResIDAndForProjID
GO

/* Query #54016 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetIsConsProjPubAllowed')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetIsConsProjPubAllowed
GO

/* Query #54017 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetIsProjectConsolidatedProj')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetIsProjectConsolidatedProj
GO

/* Query #54018 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_UpdateProjectPublishedDate')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_UpdateProjectPublishedDate
GO

/* Query #54019 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_UpdateResourcePublishedDate')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_UpdateResourcePublishedDate
GO

/* Query #67019 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllModelsOrderByName')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllModelsOrderByName
GO

/* Query #67020 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetOrgApproveTimesheetPermSettings')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetOrgApproveTimesheetPermSettings
GO

/* Query #67137 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_InsertGroupMemberByGrpID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_InsertGroupMemberByGrpID
GO

/* Query #67138 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetCategoryByCatName')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetCategoryByCatName
GO

/* Query #67139 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_UpdateCustomPage')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_UpdateCustomPage
GO

/* Query #67140 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_CustPageURLForPageID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_CustPageURLForPageID
GO

/* Query #67200 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_CheckRBSDefinedInEnterpriseGlobal')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_CheckRBSDefinedInEnterpriseGlobal
GO

/* Query #75005 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_CBE_RES1')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_CBE_RES1
GO

/* Query #75006 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAdminADSettings')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAdminADSettings
GO

/* Query #75007 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_SyncResPoolQuery1')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_SyncResPoolQuery1
GO

/* Query #75008 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_SyncGroupsQuery2')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_SyncGroupsQuery2
GO

/* Query #75009 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_SyncResPoolQuery2')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_SyncResPoolQuery2
GO

/* Query #75010 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_SyncGroupsQuery1')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_SyncGroupsQuery1
GO

/* Query #85021 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_GetWARPableAttib')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_GetWARPableAttib
GO

/* Query #85022 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_GetPoolResourceSkills')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_GetPoolResourceSkills
GO

/* Query #85023 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_GetSkillDescs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_GetSkillDescs
GO

/* Query #85024 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_GetPredecessorTaskInfo')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_GetPredecessorTaskInfo
GO

/* Query #85025 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_GetTaskUID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_GetTaskUID
GO

/* Query #85026 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_GetProjUID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_GetProjUID
GO

/* Query #85027 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_GetUserID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_GetUserID
GO

/* Query #85028 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_GetUserName')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_GetUserName
GO

/* Query #85029 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_GetEntResourcesForIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_GetEntResourcesForIDs
GO

/* Query #85030 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_GetProjectsForIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_GetProjectsForIDs
GO

/* Query #85031 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_GetPoolResNames')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_GetPoolResNames
GO

/* Query #85032 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_GetProjResourceSkills')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_GetProjResourceSkills
GO

/* Query #85033 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_GetLastPubTimestamp')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_GetLastPubTimestamp
GO

/* Query #85034 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_GetProjResListFromViews')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_GetProjResListFromViews
GO

/* Query #85035 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_GetProjResListFromViewsByVersion')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_GetProjResListFromViewsByVersion
GO

/* Query #85036 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_PredecessorsFromViews')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_PredecessorsFromViews
GO

/* Query #85037 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_SuccessorsFromViews')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_SuccessorsFromViews
GO

/* Query #85038 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_GetDefaultVersion')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_GetDefaultVersion
GO

/* Query #85039 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_GetProjectsFromMSP')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_GetProjectsFromMSP
GO

/* Query #85050 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_GetProject')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_GetProject
GO

/* Query #85051 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_GetTasks')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_GetTasks
GO

/* Query #85052 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_GetAssns')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_GetAssns
GO

/* Query #85054 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_GetTaskDetails')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_GetTaskDetails
GO

/* Query #85055 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_GetPred')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_GetPred
GO

/* Query #85057 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_GetCalendars')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_GetCalendars
GO

/* Query #85059 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_GetSucc')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_GetSucc
GO

/* Query #85060 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_MDL_GetAssnWorkContour')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_MDL_GetAssnWorkContour
GO

/* Query #90017 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetFavoriteViewFromID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetFavoriteViewFromID
GO

/* Query #90018 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_AddNewViewReports')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_AddNewViewReports
GO

/* Query #90020 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetClosedPeriodInfo')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetClosedPeriodInfo
GO

/* Query #90021 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllTimePeriodInfo')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllTimePeriodInfo
GO

/* Query #90025 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_InsertWorkAdjustInfo')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_InsertWorkAdjustInfo
GO

/* Query #90026 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_CreateApprovalRecord')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_CreateApprovalRecord
GO


/* Query #90028 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetTimePeriodInfo')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetTimePeriodInfo
GO


/* Query #390003 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetClosedPeriodInfoFromClient')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetClosedPeriodInfoFromClient
GO

/* Query #190001 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetERMVSeparator')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetERMVSeparator
GO

/* Query #390012 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetLastActualPeriodForApproval')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetLastActualPeriodForApproval
GO

/* Query #390013 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetOneActualPeriodForApproval')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetOneActualPeriodForApproval
GO

/* Query #390014 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetOneActualPeriodForSummary')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetOneActualPeriodForSummary
GO



/* Query #210237 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_UpdatePublishMasterProject')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_UpdatePublishMasterProject
GO

/* Query #210238 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_UpdateIntranetURL')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_UpdateIntranetURL
GO

/* Query #210239 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_UpdateExtranetURL')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_UpdateExtranetURL
GO

/* Query #240001 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_GetAllSTSServerForServerId')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_GetAllSTSServerForServerId
GO

/* Query #265018 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_SecGetModelsForCategoryID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_SecGetModelsForCategoryID
GO

/* Query #275007 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_EntResCheckin')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_EntResCheckin
GO

/* Query #275008 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_EntResCheckin2')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_EntResCheckin2
GO

/* Query #275100 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_GetEntpriseProjectDetailByWProjID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_GetEntpriseProjectDetailByWProjID
GO

/* Query #275101 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_GetEntResourcesManagedByWResID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_GetEntResourcesManagedByWResID
GO

/* Query #290000 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_ADM_GetTimePeriods')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_ADM_GetTimePeriods
GO

/*-----------------------------------------*/
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_CheckOrgPermission')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_CheckOrgPermission
GO

IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_CheckProjectInCategory')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_CheckProjectInCategory
GO

IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_CheckSPCatPermission')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_CheckSPCatPermission
GO

IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_CheckSPGlobalPermission')
 and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_CheckSPGlobalPermission
GO

/* Query #66017 */
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetAllResViewsByType')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetAllResViewsByType
GO

/* Query #66035 */
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetAllResProjectViewsByProject')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetAllResProjectViewsByProject
GO

IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetCatIncludeAllProjForView')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetCatIncludeAllProjForView
GO

IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetCatIncludeTAProjForView')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetCatIncludeTAProjForView
GO

/* Query #16005 */
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetPortfolioViewRSBasedOnFieldList')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetPortfolioViewRSBasedOnFieldList
GO

/* Query #16006 */
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_PortfolioViewAllFieldList')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_PortfolioViewAllFieldList
GO

IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetProjectViewInfoForViewResProjID')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetProjectViewInfoForViewResProjID
GO

IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetProjectViewReportsForResProjID')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetProjectViewReportsForResProjID
GO

IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetResIDsForAssignmentView')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetResIDsForAssignmentView
GO

IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetUserMenu')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetUserMenu
GO

/* Query #16034 */
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetWebClientViewRSBasedOnFieldList')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetWebClientViewRSBasedOnFieldList
GO

/* Query #16034 */
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetWebClientViewRSBasedOnFieldList2')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetWebClientViewRSBasedOnFieldList2
GO

/* Query #16078 */
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetAdjustActualsViewRSBasedOnFieldList')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetAdjustActualsViewRSBasedOnFieldList
GO

/* Query #16079 */
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetWebClientViewRSBasedOnFieldListInternal')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetWebClientViewRSBasedOnFieldListInternal
GO

/* Query #16080 */
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_GetAllTimeSheetFields')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllTimeSheetFields
GO

/* Query #16081 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_CopyViewReportsForViewID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_CopyViewReportsForViewID
GO


/* Query #390002 */
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetTSSummaryViewRS')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetTSSummaryViewRS
GO


/*----- ProjectCentral defined functions -----*/
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_FN_SEC_CheckOrgPermission')
and xtype in (N'FN', N'IF', N'TF'))
DROP FUNCTION dbo.MSP_WEB_FN_SEC_CheckOrgPermission
GO

IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_FN_SEC_CheckSPGlobalPermission')
and xtype in (N'FN', N'IF', N'TF'))
DROP FUNCTION dbo.MSP_WEB_FN_SEC_CheckSPGlobalPermission
GO

IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_FN_SEC_CheckResIsManagerOfProject')
and xtype in (N'FN', N'IF', N'TF'))
DROP FUNCTION dbo.MSP_WEB_FN_SEC_CheckResIsManagerOfProject
GO

IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_FN_SEC_CheckResIsMemberOfProject')
and xtype in (N'FN', N'IF', N'TF'))
DROP FUNCTION dbo.MSP_WEB_FN_SEC_CheckResIsMemberOfProject
GO

IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_FN_SEC_CheckProjectInCategory')
and xtype in (N'FN', N'IF', N'TF'))
DROP FUNCTION dbo.MSP_WEB_FN_SEC_CheckProjectInCategory
GO

IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_FN_SEC_GetResWithDocActIdOnProject')
and xtype in (N'FN', N'IF', N'TF'))
DROP FUNCTION dbo.MSP_WEB_FN_SEC_GetResWithDocActIdOnProject
GO

/*-- Used by NPE --*/
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_SetNPELastRunTime')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_SetNPELastRunTime
GO

/*-- Used by NPE --*/
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_SetNPENextRunTime')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_SetNPENextRunTime
GO


/****************************************************************************/
/*-- Project Server admin/security object permission related SP/Functions --*/
/****************************************************************************/
----------------------
-- Helper functions --
----------------------
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_FN_SEC_GetAllObjectsResCanViewByViewIDInfo')
and xtype in (N'FN', N'IF', N'TF'))
DROP FUNCTION dbo.MSP_WEB_FN_SEC_GetAllObjectsResCanViewByViewIDInfo
GO

IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_FN_SEC_GetResourcesManagedByResID')
and xtype in (N'FN', N'IF', N'TF'))
DROP FUNCTION dbo.MSP_WEB_FN_SEC_GetResourcesManagedByResID
GO

IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetResourcesManagedByResID')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetResourcesManagedByResID
GO

IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_FN_QRY_GetEntCustomField')
and xtype in (N'FN', N'IF', N'TF'))
DROP FUNCTION dbo.MSP_WEB_FN_QRY_GetEntCustomField
GO

IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_FN_QRY_GetEnterpriseOutlineCodesForFilter')
and xtype in (N'FN', N'IF', N'TF'))
DROP FUNCTION dbo.MSP_WEB_FN_QRY_GetEnterpriseOutlineCodesForFilter
GO

IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_FN_QRY_GetProjectIDsForEntProjectOutlineCodeFilter')
and xtype in (N'FN', N'IF', N'TF'))
DROP FUNCTION dbo.MSP_WEB_FN_QRY_GetProjectIDsForEntProjectOutlineCodeFilter
GO


--------------
-- Projects --
--------------
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_FN_SEC_GetAllProjectsResCanViewByViewID')
and xtype in (N'FN', N'IF', N'TF'))
DROP FUNCTION dbo.MSP_WEB_FN_SEC_GetAllProjectsResCanViewByViewID
GO

IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetAllProjectsResCanViewByViewID')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetAllProjectsResCanViewByViewID
GO

IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetAllEntProjectsForResWithTwoPermissions')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetAllEntProjectsForResWithTwoPermissions
GO

IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_CheckSPProjectPermission')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_CheckSPProjectPermission
GO

---------------
-- Resources --
---------------
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_FN_SEC_GetAllResourcesResCanViewByViewID')
and xtype in (N'FN', N'IF', N'TF'))
DROP FUNCTION dbo.MSP_WEB_FN_SEC_GetAllResourcesResCanViewByViewID
GO

IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetAllResourcesResCanViewByViewID')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetAllResourcesResCanViewByViewID
GO

IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetNumberOfResourcesResCanViewByViewID')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetNumberOfResourcesResCanViewByViewID
GO

IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_CheckSPResourcePermission')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_CheckSPResourcePermission
GO

IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetResourcesResCanViewByViewIDFromList')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetResourcesResCanViewByViewIDFromList
GO

------------
-- Models --
------------
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_FN_SEC_GetAllModelsResCanView')
and xtype in (N'FN', N'IF', N'TF'))
DROP FUNCTION dbo.MSP_WEB_FN_SEC_GetAllModelsResCanView
GO

IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_GetAllModelsResCanView')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_GetAllModelsResCanView
GO

IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_CheckSPModelPermission')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_CheckSPModelPermission
GO

-------------
-- General --
-------------
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_CheckSPObjectPermission')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_CheckSPObjectPermission
GO

IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_SEC_CheckSPObjectListPermission')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_SEC_CheckSPObjectListPermission
GO

-------------
-- PDS --
-------------
/* Query PDS001 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_ReadWProjIDByProjID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_ReadWProjIDByProjID
GO

/* Query PDS002 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_ReadProjectInfoByProjID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_ReadProjectInfoByProjID
GO

/* Query PDS003 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_ReadProjectInfoByProjType')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_ReadProjectInfoByProjType
GO

/* Query PDS004 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_ReadProjectInfoByProjName')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_ReadProjectInfoByProjName
GO

/* Query PDS005 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_ReadResourceInfoByResUID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_ReadResourceInfoByResUID
GO

/* Query PDS006 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_ReadResourceInfoByResName')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_ReadResourceInfoByResName
GO

/* Query PDS007 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_ReadGlobalInfo')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_ReadGlobalInfo
GO

/* Query PDS008 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_ReadResglobalInfo')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_ReadResglobalInfo
GO

/* Query PDS009 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_ReadResourceExtraInfo')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_ReadResourceExtraInfo
GO

/* Query PDS010 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_ResourcesAccessGrant')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_ResourcesAccessGrant
GO

/* Query PDS011 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_ResourceAssign')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_ResourceAssign
GO

/* Query PDS012 */
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_AssignmentsGetData')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_AssignmentsGetData
GO

/* Query PDS013 */
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_GetAvailableAssignments')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_GetAvailableAssignments
GO

/* Query PDS014 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_FN_MatchResourcesByMV')
and xtype in (N'FN', N'IF', N'TF'))
DROP FUNCTION dbo.MSP_PDS_FN_MatchResourcesByMV
GO

/* Query PDS015 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_SP_MatchResourcesByMV')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_SP_MatchResourcesByMV
GO

/* Query PDS016 */
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_GetWebWork')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_GetWebWork
GO

/* Query PDS017 */
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_SetAssignmentData')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_SetAssignmentData
GO

/* Query PDS018 */
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_SetAssignmentComments')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_SetAssignmentComments
GO

/* Query PDS019 */
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_AddWebWorkEntry')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_AddWebWorkEntry
GO

/* Query PDS020 */
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_ResName2WResID')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_ResName2WResID
GO

/* Required for Query PDS021 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_SP_INSERT_WEB_ASSN')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_SP_INSERT_WEB_ASSN
GO

/* Query PDS021 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_SP_ProjectCreateFromTemplate')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_SP_ProjectCreateFromTemplate
GO

/* Query PDS022 */
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_ProjectOutlineValues')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_ProjectOutlineValues
GO

/* Query PDS023 */
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_DeleteWebWork')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_DeleteWebWork
GO

/* Query PDS024 */
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_GetNotificationsServer')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_GetNotificationsServer
GO

/* Query PDS025 */
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_SP_GetPendingActuals')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_SP_GetPendingActuals
GO

/* Query PDS026 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_FN_GetProject')
and xtype in (N'FN', N'IF', N'TF'))
DROP FUNCTION dbo.MSP_PDS_FN_GetProject
GO

/* Query PDS027 */
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_SP_GetProjectCurrencyInformation')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_SP_GetProjectCurrencyInformation
GO

/* Query PDS028 */
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_SP_GetProjectInfo')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_SP_GetProjectInfo
GO

/* Query PDS029 */
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_SP_UpdateProjType')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_SP_UpdateProjType
GO

/* Query PDS030 */
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_SP_ProjectCheckin')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_SP_ProjectCheckin
GO

/* Query PDS031 */
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_SP_ProjectCheckout')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_SP_ProjectCheckout
GO

/* Query PDS032 */
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_SP_HandleProjFlags')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_SP_HandleProjFlags
GO

/* Query PDS033 */
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_SP_ProjLockUnLock')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_SP_ProjLockUnLock
GO

/* Query PDS034 */
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_SP_SetSavedDate')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_SP_SetSavedDate
GO

/* Query PDS035 */
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_SetProjectExternalEditFlag')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_SetProjectExternalEditFlag
GO

/* Query PDS036 */
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_SP_DetermineWUIDExistance')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_SP_DetermineWUIDExistance
GO

/* Query PDS037 */
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_SP_GetLookAhead')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_SP_GetLookAhead
GO

/* Query PDS038 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_SP_CLEANUP')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_SP_CLEANUP
GO

/* Query PDS039 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_SP_INSERT_TASK_MIN')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_SP_INSERT_TASK_MIN
GO

/* Query PDS040 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_SP_INSERT_RESOURCE_MIN')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_SP_INSERT_RESOURCE_MIN
GO

/* Query PDS041 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_SP_INSERT_OUTLINE_CODE_MIN')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_SP_INSERT_OUTLINE_CODE_MIN
GO

/* Query PDS042 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_SP_INSERT_CALENDAR_MIN')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_SP_INSERT_CALENDAR_MIN
GO

/* Query PDS043 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_SP_ResourceAssignmentForTask')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_SP_ResourceAssignmentForTask
GO

/* Query PDS044 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_SP_BumpResourceIDsForProject')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_SP_BumpResourceIDsForProject
GO

/* Query PDS045 */
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_SP_GetClosedPeriods')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_SP_GetClosedPeriods
GO

/* Query PDS046 */
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_SP_GetAdminProtectActuals')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_SP_GetAdminProtectActuals
GO

/* Query PDS047 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_SP_BumpTaskIDsForProject')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_SP_BumpTaskIDsForProject
GO

/* Query PDS048 */
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_SP_WriteAssnLog')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_SP_WriteAssnLog
GO

/* Query PDS049 */
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_SetExtEditRefDataOnResource')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_SetExtEditRefDataOnResource
GO

/* Query PDS050 */
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_SetExtEditRefDataAndWBSOnTask')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_SetExtEditRefDataAndWBSOnTask
GO

/* Query PDS051 */
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_SetExtEditRefDataOnLink')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_SetExtEditRefDataOnLink
GO

/* Query PDS052 */
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_SP_SetWebStartAndFinishDate')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_SP_SetWebStartAndFinishDate
GO

/* Query PDS053 */
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_SetExtEditRefDataOnAssn')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_SetExtEditRefDataOnAssn
GO

/* Query PDS054 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_ResourcesCheckout')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_ResourcesCheckout
GO

/* Query PDS055 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_ProjectsCheckout')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_ProjectsCheckout
GO

/* Query PDS056 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_ProjectAccessGrant')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_ProjectAccessGrant
GO

/* Query PDS057 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_SecurityCheckRBSandNTValue')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_SecurityCheckRBSandNTValue
GO

/* Query PDS058 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_ResourceCheckin')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_ResourceCheckin
GO

/* Query PDS059 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_UpdateRBSUIDs')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_UpdateRBSUIDs
GO

/* Query PDS060 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_ResourceDelete')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_ResourceDelete
GO

/* Query PDS061 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_ProjectResourceSetBookingType')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_ProjectResourceSetBookingType
GO

/* Query PDS062 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_MultiValueSet')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_MultiValueSet
GO

/* Query PDS063 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_GetUniqueWebResName')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_GetUniqueWebResName
GO

/* Query PDS064 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_CopyEntListSeparatorIfNull')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_CopyEntListSeparatorIfNull
GO

/* Query PDS065 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_ProjectSelectiveDelete')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_ProjectSelectiveDelete
GO

/* Query PDS066 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_CopyEROCtoERMV')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_CopyEROCtoERMV
GO
			
/* Query PDS067 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_ResourceDeleteFromProject')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_ResourceDeleteFromProject
GO

/* Query PDS068 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_GenerateAndSetCubeGUID')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_GenerateAndSetCubeGUID
GO

/* Query PDS069 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_CacheFullName')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_CacheFullName
GO
			
/* Query PDS070 */
IF EXISTS (SELECT id FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_PDS_AdminSettings')
AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_PDS_AdminSettings
GO

IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_FN_ConvertListToTable')
and xtype in (N'FN', N'IF', N'TF'))
DROP FUNCTION dbo.MSP_WEB_FN_ConvertListToTable
GO

CREATE FUNCTION dbo.MSP_WEB_FN_ConvertListToTable(@ntext ntext)
RETURNS @TokenVals table (TokenVal int)
AS
BEGIN
  declare @maxStrLen int
  declare @s nvarchar(4000)
  declare @textLen int
  declare @textPos int
  declare @nextTextDelim int
  declare @strLen int
  declare @strPos int
  declare @nextStrDelim int
  declare @val int

  set @maxStrLen = 4000

  set @textLen = datalength(@ntext) / 2 --2 bytes per char
  set @textPos = 1

  if (@textLen = 0) return

  -- Parse the text into strings of 8000 chars
  While (@textPos <= @textLen)
  Begin
     if ((@textLen - @textPos + 1) > @maxStrLen)
       begin
        set @s = substring(@ntext, @textPos, @maxStrLen)
        -- Search for the last delimiter within the string - use the fact that the max int is 10 digits
        set @nextTextDelim = charindex(',', @s, @maxStrLen - 10)

        -- cut the text to the last delimiter before the maxStrLen mark
        if (@nextTextDelim > 0)
           set @s = substring(@s, 1, @nextTextDelim - 1)
        else
           set @nextTextDelim = @maxStrLen + 1	-- Rare case, happens only when the delimiter is exactly after the last char

        set @textPos = @textPos + @nextTextDelim
       end
     Else
       begin
        -- Last text block - convert it into string
        set @s = substring(@ntext, @textPos, @textLen - @textPos + 1)
        set @textPos = @textLen + 1
       end

     -- Parse the string
     set @strLen = len(@s)
     set @strPos = 0
 
     -- For each token, load it into the table
     While @strPos <= @strLen
     Begin
        -- get the next token
        set @nextStrDelim = charindex(',', @s, @strPos)
        if @nextStrDelim = 0
           set @nextStrDelim = @strLen + 1
 
        set @val = cast(substring(@s, @strPos, @nextStrDelim - @strPos) as int)
 
        -- load the table variable
        insert @TokenVals values (@val)
 
        -- increment to the next position, and handle the last token
        set @strPos = @nextStrDelim + 1
     End --string handling
  End --text handling
RETURN
END
GO

GRANT SELECT ON dbo.MSP_WEB_FN_ConvertListToTable TO MSProjectServerRole
GO

/*-------------------------------------------------------------------------
 * FUNCTION: MSP_WEB_FN_ConvertPairListToPairTable
 * Function to return a two-column table variable from a comma-separated ID list of pairs
 * EXAMPLE: Pass in '1,2,3,4,5,6' and the return will be:
 *          |  X  |  Y  |
 *          |-----|-----|
 *          |  1  |  2  |
 *          |  3  |  4  |
 *          |  5  |  6  |
 *------------------------------------------------------------------------*/

IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_FN_ConvertPairListToPairTable')
and xtype in (N'FN', N'IF', N'TF'))
DROP FUNCTION dbo.MSP_WEB_FN_ConvertPairListToPairTable
GO

CREATE FUNCTION dbo.MSP_WEB_FN_ConvertPairListToPairTable(@ntext ntext)
RETURNS @TokenVals table (X int, Y int)
AS
BEGIN
  declare @maxStrLen int
  declare @s nvarchar(4000)
  declare @textLen int
  declare @textPos int
  declare @nextTextDelim int
  declare @strLen int
  declare @strPos int
  declare @strPosPair int
  declare @nextStrDelim int
  declare @valX int
  declare @valY int
  declare @gotX int

  set @maxStrLen = 4000

  set @textLen = datalength(@ntext) / 2 --2 bytes per char
  set @textPos = 1

  if (@textLen = 0) return

  -- Parse the text into strings of nchars
  While (@textPos <= @textLen)
  Begin
    if ((@textLen - @textPos + 1) > @maxStrLen)
      begin
       -- Get strings of max allowed length
       -- Do not set the next textPos, it will get set later
       set @s = substring(@ntext, @textPos, @maxStrLen)
      end
    else
      begin
       -- Last text block - convert it into string
       set @s = substring(@ntext, @textPos, @textLen - @textPos + 1)
       set @textPos = @textLen + 1
      end

     -- Parse the string
     set @strLen = len(@s)
     set @strPos = 0
     set @gotX = 0
  
     -- For each pair of token, load them into the table
     set @nextStrDelim = charindex(',', @s, @strPos)
     While @nextStrDelim > 0
     Begin
        if @gotX = 0
          begin
           set @valX = cast(substring(@s, @strPos, @nextStrDelim - @strPos) as int)
           set @gotX = 1
          end
        else
          begin
           set @valY = cast(substring(@s, @strPos, @nextStrDelim - @strPos) as int)
           set @gotX = 0
           insert @TokenVals values (@valX, @valY)   -- Insert the record when both values are obtained
           set @strPosPair = @nextStrDelim + 1   -- Set the string position for a new pair
          end
     
        set @strPos = @nextStrDelim + 1
        set @nextStrDelim = charindex(',', @s, @strPos)
     End --string handling

     if @textPos < @textLen + 1
       begin
        -- Not the last text chunk, start the next text chunk from the last not written pair
        set @textPos = @textPos + @strPosPair - 1
       end
     else
       begin
        -- Last text chunk, handle the last pair in that chunk
        if @gotX = 1 and @strPos <= @strLen
          begin
           set @valY = cast(substring(@s, @strPos, @strLen + 1 - @strPos) as int)
           insert @TokenVals values (@valX, @valY)
          end
       end
  End --text handling
RETURN
END
GO

GRANT SELECT ON dbo.MSP_WEB_FN_ConvertPairListToPairTable TO MSProjectServerRole
GO

/*-------------------------------------------------------------------------
 * Function to convert a ERMV FieldID to a EROC FieldID, 
 * return original valueotherwise.
 *------------------------------------------------------------------------*/

IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_FN_ConvertERMVToEROC')
and xtype in (N'FN', N'IF', N'TF'))
DROP FUNCTION dbo.MSP_WEB_FN_ConvertERMVToEROC
GO

CREATE   function dbo.MSP_WEB_FN_ConvertERMVToEROC(@fieldID int)
returns int
as
begin
	declare @newFieldID int
	if (@fieldID>=205521596 and @fieldID <= 205521614)
		set @newFieldID = @fieldID -76
	else
		set @newFieldID = @fieldID
return @newFieldID
end
GO

GRANT EXECUTE ON dbo.MSP_WEB_FN_ConvertERMVToEROC TO MSProjectServerRole
GO



/*-------------------------------------------------------------------------
 * Function to get the real RBS field id. 
 * E.g. If we link RBS to EROC1, then the field id of EROC1 becomes the 
 *      field id for RBS.
 *------------------------------------------------------------------------*/
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_FN_GetRBSFieldID')
and xtype in (N'FN', N'IF', N'TF'))
DROP FUNCTION dbo.MSP_WEB_FN_GetRBSFieldID
GO

CREATE FUNCTION dbo.MSP_WEB_FN_GetRBSFieldID()
RETURNS INT
AS
BEGIN
  declare @RBS_FieldID INT
  set @RBS_FieldID = 205521540  -- default RBS field ID.

  Select @RBS_FieldID = ATTRIB_VALUE 
    From MSP_FIELD_ATTRIBUTES MFA, 
         MSP_PROJECTS P
   Where MFA.ATTRIB_FIELD_ID = 205521540
     and MFA.ATTRIB_ID = 212
     and MFA.PROJ_ID = P.PROJ_ID
     and P.PROJ_TYPE = 2 -- Enterprise Global

  return @RBS_FieldID
END
GO

GRANT EXECUTE ON dbo.MSP_WEB_FN_GetRBSFieldID TO MSProjectServerRole
GO


/*------ Views -----*/
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_VW_SEC_ALLSP')
and OBJECTPROPERTY(id, N'IsView') = 1)
DROP VIEW dbo.MSP_WEB_VW_SEC_ALLSP
GO


/*------ STS stuff for ObjLinkProvider -----*/

/* Query #30039 */
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_AddLinkForSTS')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_AddLinkForSTS
GO

/* Query #30060 */
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'dbo.MSP_WEB_SP_QRY_RemoveLinkForSTS')
and OBJECTPROPERTY(id, N'IsProcedure') = 1)
DROP PROCEDURE dbo.MSP_WEB_SP_QRY_RemoveLinkForSTS
GO

/* Query #9000 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetResIdAuthenInfoForName
   @p0 NVARCHAR(255)
AS
--Select WRES_ID,WRES_GUID,WRES_IS_OFFLINE,WRES_USE_NT_LOGON,WRES_IS_MANAGER,WRES_IS_ADMIN,RESERVED_DATA1,RESERVED_DATA2,RESERVED_DATA3,RESERVED_DATA4 From MSP_WEB_RESOURCES Where lower(RES_NAME)=lower(@p0) and WRES_IS_ENABLED<>0 RETURN
Select WRES_ID, 
       WRES_GUID, 
       WRES_IS_OFFLINE, 
       WRES_USE_NT_LOGON, 
       WRES_IS_MANAGER, 
       WRES_IS_ADMIN, 
       RESERVED_DATA1, 
       RESERVED_DATA2, 
       RESERVED_DATA3, 
       RESERVED_DATA4 
  From MSP_WEB_RESOURCES 
 Where lower(WRES_NT_ACCOUNT) = lower(@p0) 
   and WRES_IS_ENABLED <> 0
   and WRES_CAN_LOGIN <> 0
   and WRES_COUNT_LICENSE <> 0
RETURN

GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetResIdAuthenInfoForName TO MSProjectServerRole
GO



/* Query #9001 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetResIdAuthenInfoForResID
   @p0 INT
AS
--Select WRES_ID,WRES_GUID,RES_NAME,WRES_IS_OFFLINE,WRES_USE_NT_LOGON,WRES_IS_MANAGER,WRES_IS_ADMIN,RESERVED_DATA1,RESERVED_DATA2,RESERVED_DATA3,RESERVED_DATA4 From MSP_WEB_RESOURCES Where WRES_ID=@p0 and WRES_IS_ENABLED<>0 RETURN
Select WRES_ID, 
       WRES_GUID, 
       RES_NAME, 
       WRES_IS_OFFLINE, 
       WRES_USE_NT_LOGON, 
       WRES_IS_MANAGER, 
       WRES_IS_ADMIN, 
       RESERVED_DATA1, 
       RESERVED_DATA2, 
       RESERVED_DATA3, 
       RESERVED_DATA4 
  From MSP_WEB_RESOURCES 
 Where WRES_ID = @p0 
   and WRES_IS_ENABLED <> 0
RETURN

GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetResIdAuthenInfoForResID TO MSProjectServerRole
GO



/* Query #10001 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetUserLst
AS
--Select RES_NAME,WRES_ID From MSP_WEB_RESOURCES Where WRES_USE_NT_LOGON=0 and WRES_IS_ENABLED<>0 Order by RES_NAME RETURN
Select RES_NAME, 
       WRES_ID 
  From MSP_WEB_RESOURCES 
 Where WRES_USE_NT_LOGON = 0 
   and WRES_IS_ENABLED <> 0 
 Order by RES_NAME
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetUserLst TO MSProjectServerRole
GO



/* Query #10002 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetChannelTimes
   @p0 NVARCHAR(255)
AS
--Select WRES_LAST_UPDATE_TIME,WRES_LAST_CHECKED_TIME From MSP_WEB_RESOURCES Where lower(RES_NAME)=lower(@p0) and WRES_IS_ENABLED<>0 RETURN
Select WRES_LAST_UPDATE_TIME, 
       WRES_LAST_CHECKED_TIME 
  From MSP_WEB_RESOURCES 
 Where lower(RES_NAME) = lower(@p0) 
   and WRES_IS_ENABLED <> 0

GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetChannelTimes TO MSProjectServerRole
GO



/* Query #10003 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetFullUserLst
   @p0 INT
AS
--Select RES_NAME,WRES_ID From MSP_WEB_RESOURCES where WRES_ID <> @p0 and WRES_IS_ENABLED<>0 Order by RES_NAME RETURN
Select RES_NAME, 
       WRES_ID 
  From MSP_WEB_RESOURCES 
 where WRES_ID <> @p0
   and WRES_IS_ENABLED <> 0 
 Order by RES_NAME
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetFullUserLst TO MSProjectServerRole
GO



/* Query #10004 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetProjectSummaryTaskAssn
   @p0 INT
AS
--Select * from MSP_WEB_ASSIGNMENTS where WPROJ_ID=@p0 and WRES_ID=-1 RETURN
Select * 
  from MSP_WEB_ASSIGNMENTS 
 where WPROJ_ID = @p0 
   and WRES_ID = -1
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetProjectSummaryTaskAssn TO MSProjectServerRole
GO



/* Query #10005 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetTasksMsgAssnForMsgID
   @p0 INT
AS
--Select * From MSP_WEB_MESSAGES_ASSIGNMENTS Where WMSG_ID=@p0 RETURN
Select * 
  From MSP_WEB_MESSAGES_ASSIGNMENTS 
 Where WMSG_ID = @p0
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetTasksMsgAssnForMsgID TO MSProjectServerRole
GO



/* Query #10006 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetUnRequestedReportsForUser
   @p0 INT
AS
--Select WSR_ID,WREPORT_NAME From MSP_WEB_STATUS_REPORTS Where WRES_ID_MGR=@p0 and WREPORT_UNREQUESTED=0 and WREPORT_IS_ENABLED<>0 order by WREPORT_NAME RETURN
Select WSR_ID, 
       WREPORT_NAME 
  From MSP_WEB_STATUS_REPORTS 
 Where WRES_ID_MGR = @p0 
   and WREPORT_UNREQUESTED = 0 
   and WREPORT_IS_ENABLED <> 0 
 order by WREPORT_NAME
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetUnRequestedReportsForUser TO MSProjectServerRole
GO



/* Query #10007 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetMsgForSamePeriod
   @p0 INT,
   @p1 INT,
   @p2 INT,
   @p3 INT,
   @p4 INT,
   @p5 DATETIME,
   @p6 DATETIME,
   @p7 INT,
   @p8 INT
AS
--Select WMSG_ID from MSP_WEB_MESSAGES where WRES_ID_SENDER=@p0 and WRES_ID_RECEIVER=@p1 and WPROJ_ID=@p2 and WMSG_PROJ_TYPE=@p3 and WMSG_ACTUAL_TYPE=@p4 and WMSG_PERIOD_START=@p5 and WMSG_PERIOD_FINISH=@p6 and WMSG_PERIOD_BROKEN_BY=@p7 and WMSG_PERIOD_WEEK_STARTS_ON=@p8 RETURN
Select WMSG_ID 
  from MSP_WEB_MESSAGES 
 where WRES_ID_SENDER = @p0 
   and WRES_ID_RECEIVER = @p1 
   and WPROJ_ID = @p2 
   and WMSG_PROJ_TYPE = @p3 
   and WMSG_ACTUAL_TYPE = @p4 
   and WMSG_PERIOD_START = @p5 
   and WMSG_PERIOD_FINISH = @p6 
   and WMSG_PERIOD_BROKEN_BY = @p7 
   and WMSG_PERIOD_WEEK_STARTS_ON = @p8
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetMsgForSamePeriod TO MSProjectServerRole
GO



/* Query #10008 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetMsgForMsgIDAndResID
   @p0 INT,
   @p1 INT
AS
--Select * From MSP_WEB_MESSAGES Where WMSG_ID=@p0 and WRES_ID_RECEIVER=@p1 RETURN
Select * 
  From MSP_WEB_MESSAGES 
 Where WMSG_ID = @p0 
   and WRES_ID_RECEIVER = @p1
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetMsgForMsgIDAndResID TO MSProjectServerRole
GO



/* Query #10009 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetTasksMsgAssn
AS
--Select * From MSP_WEB_MESSAGES_ASSIGNMENTS Where WMSG_ID=-1 RETURN
Select * 
  From MSP_WEB_MESSAGES_ASSIGNMENTS WITH (READPAST)
 Where WMSG_ID = -1
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetTasksMsgAssn TO MSProjectServerRole
GO



/* Query #10010 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetTasksMessages
AS
--Select * From MSP_WEB_MESSAGES Where WMSG_ID=-1 RETURN
Select * 
  From MSP_WEB_MESSAGES WITH (READPAST) 
 Where WMSG_ID = -1
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetTasksMessages TO MSProjectServerRole
GO



/* Query #10011 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetTasksIDs
   @p0 INT
AS

select
  WA.WASSN_ID, 
  WA.WRES_ID_MGR, 
  WA.WPROJ_ID, 
  WP.PROJ_NAME, 
  WP.WPROJ_TYPE, 
  WA.WASSN_ACTUALS_PENDING, 
  WA.WASSN_RESOURCE_UPDATE, 
  WA.WASSN_SEND_UPDATE_NEEDED, 
  WA.WASSN_REQUEST_UPDATE, 
  WA.WASSN_SEND_UPDATE_DATE 
from
  (
    select WASSN_ID from MSP_WEB_ASSIGNMENTS where WRES_ID=@p0 and WRES_ID_TEAM_LEAD is null
    union
    select WASSN_ID from MSP_WEB_ASSIGNMENTS WAT2 (index=I_ASSIGN_WRESID_TEAM_LEAD) where WAT2.WRES_ID_TEAM_LEAD=@p0
  ) as WAT
  inner join MSP_WEB_ASSIGNMENTS WA on WAT.WASSN_ID=WA.WASSN_ID
  inner join MSP_WEB_PROJECTS WP on WA.WPROJ_ID=WP.WPROJ_ID
where WP.WPROJ_IS_NONWORKING=0 
  and WA.WASSN_SEND_UPDATE_NEEDED<>0 
  and WA.WASSN_IS_CONFIRMED<>0 
  and WA.WASSN_CREATED_BY_RES<>3 
  and WA.WASSN_CREATED_BY_RES<>1 
  and WA.WASSN_REMOVED_BY_RESOURCE=0 
order by WA.WPROJ_ID, WA.WRES_ID_MGR
 
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetTasksIDs TO MSProjectServerRole
GO



/* Query #10012 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllResourceForResId
   @p0 INT
AS
--Select * From MSP_WEB_RESOURCES Where WRES_ID=@p0 and WRES_IS_ENABLED<>0 RETURN
Select * 
  From MSP_WEB_RESOURCES 
 Where WRES_ID = @p0 
   and WRES_IS_ENABLED <> 0
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetAllResourceForResId TO MSProjectServerRole
GO



/* Query #10013 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetResIdFromName
   @p0 NVARCHAR(255)
AS
--Select WRES_ID From MSP_WEB_RESOURCES Where lower(RES_NAME)=lower(@p0) and WRES_IS_ENABLED<>0 RETURN
Select WRES_ID 
  From MSP_WEB_RESOURCES 
 Where lower(RES_NAME) = lower(@p0) 
   and WRES_IS_ENABLED <> 0
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetResIdFromName TO MSProjectServerRole
GO



/* Query #10014 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetFileIdFromPathOwner
   @p0 NVARCHAR(255),
   @p1 INT
AS
--Select WPROJ_ID From MSP_WEB_PROJECTS Where lower(WLOCAL_PATH)=lower(@p0) and WRES_ID=@p1 RETURN
Select WPROJ_ID 
  From MSP_WEB_PROJECTS 
 Where lower(WLOCAL_PATH) = lower(@p0) 
   and WRES_ID = @p1
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetFileIdFromPathOwner TO MSProjectServerRole
GO



/* Query #10015 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllResourceForName
   @p0 NVARCHAR(255)
AS
Select * 
  From MSP_WEB_RESOURCES 
 Where lower(RES_NAME) = lower(@p0) 
   and WRES_IS_ENABLED <> 0
   and WRES_CAN_LOGIN <> 0
   and WRES_COUNT_LICENSE <> 0
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetAllResourceForName TO MSProjectServerRole
GO



/* Query #10016 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_DeleteCFForProjectSummaryAssn
   @p0 INT
AS
--Delete from MSP_WEB_WORKGROUP_FIELDS Where WASSN_ID=@p0 RETURN(0)
Delete 
  from MSP_WEB_WORKGROUP_FIELDS 
 Where WASSN_ID = @p0
RETURN(0)
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_DeleteCFForProjectSummaryAssn TO MSProjectServerRole
GO



/* Query #10017 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllMessagesForMessageId
   @p0 INT
AS
--Select * From MSP_WEB_MESSAGES Where WMSG_ID=@p0 RETURN
Select * 
  From MSP_WEB_MESSAGES 
 Where WMSG_ID = @p0
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetAllMessagesForMessageId TO MSProjectServerRole
GO



/* Query #10018 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllAssignmentsForFileIdTaskProjId
   @p0 INT,
   @p1 INT,
   @p2 INT
AS
--Select * From MSP_WEB_ASSIGNMENTS Where WPROJ_ID=@p0 and TASK_UID=@p1 and WRES_ID=@p2 and TASK_IS_SUMMARY<>0 RETURN
Select * 
  From MSP_WEB_ASSIGNMENTS WITH (NOLOCK)
 Where WPROJ_ID = @p0 
   and TASK_UID = @p1 
   and WRES_ID = @p2 
   and TASK_IS_SUMMARY <> 0
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetAllAssignmentsForFileIdTaskProjId TO MSProjectServerRole
GO



/* Query #10019 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllAssignmentsForFileIdAssnProjId
   @p0 INT,
   @p1 INT,
   @p2 INT
AS
--Select * From MSP_WEB_ASSIGNMENTS Where WPROJ_ID=@p0 and ASSN_UID=@p1 and WRES_ID=@p2 RETURN
Select * 
  From MSP_WEB_ASSIGNMENTS 
 Where WPROJ_ID = @p0 
   and ASSN_UID = @p1 
   and WRES_ID = @p2
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetAllAssignmentsForFileIdAssnProjId TO MSProjectServerRole
GO



/* Query #10020 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllFilesFromPathOwner
   @p0 NVARCHAR(32),
   @p1 NVARCHAR(255)
AS
--Select * From MSP_WEB_PROJECTS Where PROJ_TIMESTAMP=@p0 and lower(PROJ_NAME)=lower(@p1) RETURN
Select * 
  From MSP_WEB_PROJECTS 
 Where PROJ_TIMESTAMP = @p0 
   and lower(PROJ_NAME) = lower(@p1) and PROJ_ID is NULL
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetAllFilesFromPathOwner TO MSProjectServerRole
GO



/* Query #10021 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetSummaryAssnFromProjIdAndResId
   @p0 INT,
   @p1 INT
AS
--Select WASSN_ID From MSP_WEB_ASSIGNMENTS Where WPROJ_ID=@p0 and WRES_ID=@p1 and TASK_IS_SUMMARY<>0 RETURN
Select WASSN_ID 
  From MSP_WEB_ASSIGNMENTS 
 Where WPROJ_ID = @p0 
   and WRES_ID = @p1 
   and TASK_IS_SUMMARY <> 0
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetSummaryAssnFromProjIdAndResId TO MSProjectServerRole
GO



/* Query #10022 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllAssignmentsForFileIdAssnProjIdNoResId
   @p0 INT,
   @p1 INT
AS
--Select * From MSP_WEB_ASSIGNMENTS Where WPROJ_ID=@p0 and ASSN_UID=@p1 RETURN
Select * 
  From MSP_WEB_ASSIGNMENTS 
 Where WPROJ_ID = @p0 
   and ASSN_UID = @p1
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetAllAssignmentsForFileIdAssnProjIdNoResId TO MSProjectServerRole
GO



/* Query #10023 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetSRIDFromReportNameResID
   @p0 NVARCHAR(255),
   @p1 INT
AS
--Select WSR_ID From MSP_WEB_STATUS_REPORTS Where lower(WREPORT_NAME)=lower(@p0) and WRES_ID_MGR=@p1 and WREPORT_IS_ENABLED<>0 RETURN
Select WSR_ID 
  From MSP_WEB_STATUS_REPORTS 
 Where lower(WREPORT_NAME) = lower(@p0) 
   and WRES_ID_MGR = @p1 
   and WREPORT_IS_ENABLED <> 0
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetSRIDFromReportNameResID TO MSProjectServerRole
GO



/* Query #10024 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllCFForProjID
   @p0 INT
AS
--Select * from MSP_WEB_WORKGROUP_FIELDS where WASSN_ID=@p0 RETURN
Select * 
  from MSP_WEB_WORKGROUP_FIELDS 
 where WASSN_ID = @p0
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetAllCFForProjID TO MSProjectServerRole
GO



/* Query #10027 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetResIDForResIDAndCookieLongs
   @p0 INT,
   @p1 INT,
   @p2 INT
AS
--SELECT WRES_ID FROM MSP_WEB_RESOURCES WHERE WRES_ID=@p0 and MSP_WEB_RESOURCES.RESERVED_DATA3=@p1 and MSP_WEB_RESOURCES.RESERVED_DATA4=@p2 and WRES_IS_ENABLED<>0 RETURN
SELECT WRES_ID,
       WRES_GUID
  FROM MSP_WEB_RESOURCES 
 WHERE WRES_ID = @p0 
   and MSP_WEB_RESOURCES.RESERVED_DATA3 = @p1 
   and MSP_WEB_RESOURCES.RESERVED_DATA4 = @p2 
   and WRES_IS_ENABLED <> 0
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetResIDForResIDAndCookieLongs TO MSProjectServerRole
GO



/* Query #10028 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_UpdateUpdatedByMgrToFalse
   @p0 INT
AS
-- update MSP_WEB_ASSIGNMENTS set WASSN_MGR_UPDATED=0,WASSN_IS_NEW_ASSN=0 where WRES_ID=@p0 and (WASSN_MGR_UPDATED<>0 or WASSN_IS_NEW_ASSN<>0) RETURN(0)
update MSP_WEB_ASSIGNMENTS 
   set WASSN_MGR_UPDATED = 0, 
       WASSN_IS_NEW_ASSN = 0 
 where WRES_ID = @p0 
   and (WASSN_MGR_UPDATED <> 0 
            or WASSN_IS_NEW_ASSN <> 0)
RETURN(0)
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_UpdateUpdatedByMgrToFalse TO MSProjectServerRole
GO



/* Query #10030 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetMgrIDForMsgIDAndCookieLongs
   @p0 INT,
   @p1 INT,
   @p2 INT
AS
--select WRES_ID from MSP_WEB_RESOURCES,MSP_WEB_MESSAGES where WMSG_ID=@p0 and WRES_ID_RECEIVER=WRES_ID and MSP_WEB_RESOURCES.RESERVED_DATA3=@p1 and MSP_WEB_RESOURCES.RESERVED_DATA4=@p2 and WRES_IS_ENABLED<>0 RETURN
select WRES_ID 
  from MSP_WEB_RESOURCES, 
       MSP_WEB_MESSAGES 
 where WMSG_ID = @p0 
   and WRES_ID_RECEIVER = WRES_ID 
   and MSP_WEB_RESOURCES.RESERVED_DATA3 = @p1 
   and MSP_WEB_RESOURCES.RESERVED_DATA4 = @p2 
   and WRES_IS_ENABLED <> 0
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetMgrIDForMsgIDAndCookieLongs TO MSProjectServerRole
GO



/* Query #10031 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_UpdateAssnDirtyFlagForMsgID
   @p0 INT
AS
--update MSP_WEB_ASSIGNMENTS set WASSN_SEND_UPDATE_NEEDED=0,WASSN_ACTUALS_PENDING=0 where WASSN_ID in (select WASSN_ID from MSP_WEB_MESSAGES_ASSIGNMENTS where WMSG_ID=@p0) RETURN(0)
update MSP_WEB_ASSIGNMENTS 
   set WASSN_SEND_UPDATE_NEEDED = 0, 
       WASSN_ACTUALS_PENDING = 0 
 where WASSN_ID in (select WASSN_ID 
                      from MSP_WEB_MESSAGES_ASSIGNMENTS 
                     where WMSG_ID = @p0)
RETURN(0)
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_UpdateAssnDirtyFlagForMsgID TO MSProjectServerRole
GO



/* Query #10032 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetDSNByName
   @p0 NVARCHAR(255)
AS
--select * from MSP_WEB_VIEW_DSNS where lower(WDSN_NAME)=lower(@p0) RETURN
select * 
  from MSP_WEB_VIEW_DSNS 
 where lower(WDSN_NAME) = lower(@p0)
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetDSNByName TO MSProjectServerRole
GO



/* Query #10033 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetNameCookieLongsForResId
   @p0 INT
AS
--Select RES_NAME,WRES_USE_NT_LOGON,WRES_IS_MANAGER,RESERVED_DATA3,RESERVED_DATA4,WRES_IS_ADMIN From MSP_WEB_RESOURCES Where WRES_ID =@p0 and WRES_IS_ENABLED<>0 RETURN
Select RES_NAME, 
       WRES_USE_NT_LOGON, 
       WRES_IS_MANAGER, 
       RESERVED_DATA3, 
       RESERVED_DATA4, 
       WRES_IS_ADMIN 
  From MSP_WEB_RESOURCES 
 Where WRES_ID = @p0 
   and WRES_IS_ENABLED <> 0
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetNameCookieLongsForResId TO MSProjectServerRole
GO



/* Query #10034 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllAssignmentsForAssnId
   @p0 INT,
   @p1 INT,
   @p2 INT
AS
--Select * From MSP_WEB_ASSIGNMENTS Where WPROJ_ID=@p0 and WASSN_ID=@p1 and WRES_ID=@p2 RETURN
Select * 
  From MSP_WEB_ASSIGNMENTS 
 Where WPROJ_ID = @p0 
   and WASSN_ID = @p1 
   and WRES_ID = @p2
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetAllAssignmentsForAssnId TO MSProjectServerRole
GO



/* Query #10035 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetAdminRandomSeeds
AS
--Select RESERVED_DATA1, RESERVED_DATA2 from MSP_WEB_RESERVED_DATA RETURN
Select RESERVED_DATA1, 
       RESERVED_DATA2 
  from MSP_WEB_RESERVED_DATA
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetAdminRandomSeeds TO MSProjectServerRole
GO



/* Query #10036 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_UpdateAssnTrackingModeForMsgID
   @p0 INT
AS
--update MSP_WEB_ASSIGNMENTS set WASSN_UPDATE_TRACKING_MODE=WASSN_CURRENT_TRACKING_MODE where WASSN_ID in (select WASSN_ID from MSP_WEB_MESSAGES_ASSIGNMENTS where WMSG_ID=@p0) RETURN(0)
update MSP_WEB_ASSIGNMENTS 
   set WASSN_UPDATE_TRACKING_MODE = WASSN_CURRENT_TRACKING_MODE 
 where WASSN_ID in (select WASSN_ID 
                      from MSP_WEB_MESSAGES_ASSIGNMENTS 
                     where WMSG_ID = @p0)
RETURN(0)
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_UpdateAssnTrackingModeForMsgID TO MSProjectServerRole
GO



/* Query #10040 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetResNameAndNoRecords
AS
--Select RES_NAME From MSP_WEB_RESOURCES where WRES_ID=-1 and WRES_IS_ENABLED<>0 RETURN
Select RES_NAME 
  From MSP_WEB_RESOURCES 
 where WRES_ID = -1 
   and WRES_IS_ENABLED <> 0
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetResNameAndNoRecords TO MSProjectServerRole
GO



/* Query #10041 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetResAnsReportNameAndNoRecords
AS
--select RES_NAME,WREPORT_NAME from MSP_WEB_RESOURCES,MSP_WEB_STATUS_REPORTS where WRES_ID=-1 and WSR_ID=-1 and WRES_IS_ENABLED<>0 and WREPORT_IS_ENABLED<>0 RETURN
select RES_NAME, 
       WREPORT_NAME 
  from MSP_WEB_RESOURCES, 
       MSP_WEB_STATUS_REPORTS 
 where WRES_ID = -1 
   and WSR_ID = -1 
   and WRES_IS_ENABLED <> 0 
   and WREPORT_IS_ENABLED <> 0
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetResAnsReportNameAndNoRecords TO MSProjectServerRole
GO



/* Query #10042 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetFileIDProjNameFromFilesForResID
   @p0 INT
AS
--Select WPROJ_ID,PROJ_NAME From MSP_WEB_PROJECTS where WRES_ID=@p0 Order By PROJ_NAME RETURN
Select WPROJ_ID, 
       PROJ_NAME 
  From MSP_WEB_PROJECTS 
 where WRES_ID = @p0 
 Order By PROJ_NAME
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetFileIDProjNameFromFilesForResID TO MSProjectServerRole
GO



/* Query #10043 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetFileIDProjNameFromFilesForNotResID
   @p0 INT
AS
--Select WPROJ_ID,PROJ_NAME From MSP_WEB_PROJECTS where WRES_ID<>@p0 Order By PROJ_NAME RETURN
Select WPROJ_ID, 
       PROJ_NAME 
  From MSP_WEB_PROJECTS 
 where WRES_ID <> @p0 
 Order By PROJ_NAME
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetFileIDProjNameFromFilesForNotResID TO MSProjectServerRole
GO



/* Query #10044 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllFromResourcesReportsAndResp
   @p0 INT,
   @p1 INT
AS
--Select MSP_WEB_STATUS_RESPONSES.*,MSP_WEB_STATUS_REPORTS.WREPORT_NAME,MSP_WEB_STATUS_REPORTS.WRES_ID_MGR,MSP_WEB_STATUS_REPORTS.WREPORT_UNREQUESTED,MSP_WEB_RESOURCES.RES_NAME From MSP_WEB_STATUS_REPORTS,MSP_WEB_STATUS_RESPONSES,MSP_WEB_RESOURCES,MSP_WEB_STATUS_DISTRIBUTION Where MSP_WEB_STATUS_REPORTS.WSR_ID=MSP_WEB_STATUS_RESPONSES.WSR_ID and MSP_WEB_STATUS_RESPONSES.WRESP_ID=@p0 and MSP_WEB_RESOURCES.WRES_ID=MSP_WEB_STATUS_REPORTS.WRES_ID_MGR and MSP_WEB_STATUS_RESPONSES.WRESP_ID=MSP_WEB_STATUS_DISTRIBUTION.WRESP_ID and MSP_WEB_STATUS_DISTRIBUTION.WRES_ID_DISTR_RECIP=@p1 RETURN
-- Conversion to ANSI INNER JOIN
Select MSP_WEB_STATUS_RESPONSES.*, 
       MSP_WEB_STATUS_REPORTS.WREPORT_NAME, 
       MSP_WEB_STATUS_REPORTS.WRES_ID_MGR, 
       MSP_WEB_STATUS_REPORTS.WREPORT_UNREQUESTED, 
       MSP_WEB_RESOURCES.RES_NAME 
  From MSP_WEB_STATUS_REPORTS 
       INNER JOIN MSP_WEB_STATUS_RESPONSES 
          ON MSP_WEB_STATUS_REPORTS.WSR_ID = MSP_WEB_STATUS_RESPONSES.WSR_ID, 
       MSP_WEB_RESOURCES, 
       MSP_WEB_STATUS_DISTRIBUTION 
 Where MSP_WEB_STATUS_RESPONSES.WRESP_ID = @p0
   and MSP_WEB_RESOURCES.WRES_ID = MSP_WEB_STATUS_REPORTS.WRES_ID_MGR 
   and MSP_WEB_STATUS_RESPONSES.WRESP_ID = MSP_WEB_STATUS_DISTRIBUTION.WRESP_ID 
   and MSP_WEB_STATUS_DISTRIBUTION.WRES_ID_DISTR_RECIP = @p1

GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetAllFromResourcesReportsAndResp TO MSProjectServerRole
GO



/* Query #10045 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllFromStatusRespOrderSubmitted
   @p0 INT,
   @p1 INT
AS
--Select MSP_WEB_STATUS_RESPONSES.*, MSP_WEB_RESOURCES.RES_NAME from MSP_WEB_STATUS_RESPONSES, MSP_WEB_RESOURCES where MSP_WEB_STATUS_RESPONSES.WRES_ID=@p0 and MSP_WEB_STATUS_RESPONSES.WSR_ID=@p1 and MSP_WEB_STATUS_RESPONSES.WRES_ID=MSP_WEB_RESOURCES.WRES_ID Order By WSUBMIT_DATE RETURN
-- Conversion to ANSI INNER JOIN
Select MSP_WEB_STATUS_RESPONSES.*, 
       MSP_WEB_RESOURCES.RES_NAME 
  from MSP_WEB_STATUS_RESPONSES 
       INNER JOIN MSP_WEB_RESOURCES 
          ON MSP_WEB_STATUS_RESPONSES.WRES_ID = MSP_WEB_RESOURCES.WRES_ID 
 where MSP_WEB_STATUS_RESPONSES.WRES_ID = @p0 
   and MSP_WEB_STATUS_RESPONSES.WSR_ID = @p1
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetAllFromStatusRespOrderSubmitted TO MSProjectServerRole
GO



/* Query #10046 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetRespnseIDFromResponsesAndDist
   @p0 INT
AS
--Select MSP_WEB_STATUS_RESPONSES.WRESP_ID From MSP_WEB_STATUS_RESPONSES,MSP_WEB_STATUS_DISTRIBUTION Where MSP_WEB_STATUS_DISTRIBUTION.WRES_ID_DISTR_RECIP=@p0 and MSP_WEB_STATUS_DISTRIBUTION.WRESP_ID=MSP_WEB_STATUS_RESPONSES.WRESP_ID and MSP_WEB_STATUS_RESPONSES.WRES_ID=MSP_WEB_STATUS_DISTRIBUTION.WRES_ID_DISTR_RECIP RETURN
-- Conversion to ANSI INNER JOIN
Select MSP_WEB_STATUS_RESPONSES.WRESP_ID 
  From MSP_WEB_STATUS_RESPONSES 
       INNER JOIN MSP_WEB_STATUS_DISTRIBUTION 
          ON MSP_WEB_STATUS_RESPONSES.WRES_ID = MSP_WEB_STATUS_DISTRIBUTION.WRES_ID_DISTR_RECIP 
 Where MSP_WEB_STATUS_DISTRIBUTION.WRES_ID_DISTR_RECIP = @p0 
   and MSP_WEB_STATUS_DISTRIBUTION.WRESP_ID = MSP_WEB_STATUS_RESPONSES.WRESP_ID
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetRespnseIDFromResponsesAndDist TO MSProjectServerRole
GO



/* Query #10047 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetReportsForMgrOrderName
   @p0 INT
AS
--Select WSR_ID,WREPORT_NAME From MSP_WEB_STATUS_REPORTS Where WRES_ID_MGR=@p0 and WREPORT_IS_ENABLED<>0 and WREPORT_UNREQUESTED=0 order by WREPORT_NAME RETURN
Select WSR_ID, 
       WREPORT_NAME 
  From MSP_WEB_STATUS_REPORTS 
 Where WRES_ID_MGR = @p0 
   and WREPORT_IS_ENABLED <> 0 
   and WREPORT_UNREQUESTED = 0 
 order by WREPORT_NAME
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetReportsForMgrOrderName TO MSProjectServerRole
GO



/* Query #10048 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetStatusRequestsForResIDNotSent
   @p0 INT
AS
--Select * From MSP_WEB_STATUS_REQUESTS Where WRES_ID_RECEIVER=@p0 and WREQ_IS_SENT<>0 and WREQ_IS_ENABLED<>0 RETURN
Select * 
  From MSP_WEB_STATUS_REQUESTS 
 Where WRES_ID_RECEIVER = @p0 
   and WREQ_IS_SENT <> 0 
   and WREQ_IS_ENABLED <> 0
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetStatusRequestsForResIDNotSent TO MSProjectServerRole
GO



/* Query #10051 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_NewTasksCreatedByResForMgr
   @p0 INT
AS
--Select WASSN_ID,WASSN_CREATED_BY_RES,WASSN_SEND_UPDATE_DATE,WRES_ID_MGR,WA.WPROJ_ID,PROJ_NAME,RES_NAME from MSP_WEB_ASSIGNMENTS WA,MSP_WEB_PROJECTS WP,MSP_WEB_RESOURCES WR Where WA.WPROJ_ID=WP.WPROJ_ID and WA.WRES_ID_MGR=WR.WRES_ID and WA.WRES_ID=@p0 and WASSN_CREATED_BY_RES=1 and WASSN_REMOVED_BY_RESOURCE=0 order by RES_NAME,WA.WPROJ_ID RETURN
-- Conversion to ANSI INNER JOIN
Select WASSN_ID, 
       WASSN_CREATED_BY_RES,
	   WASSN_ASSIGNED_TO_EXISTING, 
       WASSN_SEND_UPDATE_DATE, 
       WRES_ID_MGR, 
       WA.WPROJ_ID, 
       PROJ_NAME, 
       RES_NAME 
  from MSP_WEB_ASSIGNMENTS WA 
       INNER JOIN MSP_WEB_PROJECTS WP 
          ON WA.WPROJ_ID = WP.WPROJ_ID, 
       MSP_WEB_RESOURCES WR 
 Where WA.WRES_ID_MGR = WR.WRES_ID 
   and WA.WRES_ID = @p0
   and WASSN_CREATED_BY_RES = 1 
   and WASSN_REMOVED_BY_RESOURCE = 0 
 order by RES_NAME, 
          WA.WPROJ_ID
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_NewTasksCreatedByResForMgr TO MSProjectServerRole
GO



/* Query #10054 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetNamePathFromFileID
   @p0 INT,
   @p1 INT
AS
Select PROJ_NAME, 
       WPATH, 
       MSP_WEB_PROJECTS.WDSN_ID, 
       WDSN_NAME, 
       WDSN_LOGIN_ID 
  From MSP_WEB_PROJECTS 
       LEFT JOIN MSP_WEB_VIEW_DSNS 
         ON MSP_WEB_PROJECTS.WDSN_ID = MSP_WEB_VIEW_DSNS.WDSN_ID 
 Where WPROJ_ID = @p0 

GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetNamePathFromFileID TO MSProjectServerRole
GO



/* Query #10055 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetMessagesForResID
   @p0 INT
AS
--Select MSP_WEB_MESSAGES.*, WR1.RES_NAME From MSP_WEB_MESSAGES, MSP_WEB_RESOURCES WR1 Where WMSG_ID=@p0 and WRES_ID_SENDER=WRES_ID RETURN
Select MSP_WEB_MESSAGES.*, 
       WR1.RES_NAME 
  From MSP_WEB_MESSAGES, 
       MSP_WEB_RESOURCES WR1 
 Where WMSG_ID = @p0 
   and WRES_ID_SENDER = WRES_ID
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetMessagesForResID TO MSProjectServerRole
GO



/* Query #10056 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetFileNameFromFileID
   @p0 INT
AS
--Select PROJ_NAME, WRES_ID From MSP_WEB_PROJECTS Where WPROJ_ID=@p0 RETURN
Select PROJ_NAME, 
       WRES_ID 
  From MSP_WEB_PROJECTS 
 Where WPROJ_ID = @p0
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetFileNameFromFileID TO MSProjectServerRole
GO



/* Query #10057 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllStatusResponses
AS
--Select * From MSP_WEB_STATUS_RESPONSES RETURN
Select * 
  From MSP_WEB_STATUS_RESPONSES 
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetAllStatusResponses TO MSProjectServerRole
GO



/* Query #10058 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetStatusResponsesForRespID
   @p0 INT
AS
--Select * From MSP_WEB_STATUS_RESPONSES Where WRESP_ID=@p0 RETURN
Select * 
  From MSP_WEB_STATUS_RESPONSES 
 Where WRESP_ID = @p0
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetStatusResponsesForRespID TO MSProjectServerRole
GO



/* Query #10059 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetStatusRequestsForResIDAndSRID
   @p0 INT,
   @p1 INT
AS
--Select * From MSP_WEB_STATUS_REQUESTS Where WRES_ID_RECEIVER=@p0 and WSR_ID=@p1 and WREQ_IS_SENT<>0 RETURN
Select * 
  From MSP_WEB_STATUS_REQUESTS 
 Where WRES_ID_RECEIVER = @p0 
   and WSR_ID = @p1 
   and WREQ_IS_SENT <> 0
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetStatusRequestsForResIDAndSRID TO MSProjectServerRole
GO



/* Query #10060 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetFlagNewRequestForResIDAndSRID
   @p0 INT,
   @p1 INT
AS
--Select WREQ_IS_NEW_REQUEST From MSP_WEB_STATUS_REQUESTS Where WRES_ID_RECEIVER=@p0 and WSR_ID=@p1 and WREQ_IS_SENT<>0 RETURN
Select WREQ_IS_NEW_REQUEST 
  From MSP_WEB_STATUS_REQUESTS 
 Where WRES_ID_RECEIVER = @p0 
   and WSR_ID = @p1 
   and WREQ_IS_SENT <> 0
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetFlagNewRequestForResIDAndSRID TO MSProjectServerRole
GO



/* Query #10061 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetStatusRepAndRespForRespID
   @p0 INT
AS
--Select MSP_WEB_STATUS_RESPONSES.*,MSP_WEB_STATUS_REPORTS.*,MSP_WEB_RESOURCES.RES_NAME From MSP_WEB_STATUS_RESPONSES,MSP_WEB_STATUS_REPORTS,MSP_WEB_RESOURCES Where MSP_WEB_STATUS_RESPONSES.WRESP_ID=@p0 and MSP_WEB_RESOURCES.WRES_ID=MSP_WEB_STATUS_REPORTS.WRES_ID_MGR and MSP_WEB_STATUS_RESPONSES.WSR_ID=MSP_WEB_STATUS_REPORTS.WSR_ID RETURN
-- Conversion to ANSI INNER JOIN
Select MSP_WEB_STATUS_RESPONSES.*, 
       MSP_WEB_STATUS_REPORTS.*, 
       MSP_WEB_RESOURCES.RES_NAME 
  From MSP_WEB_STATUS_RESPONSES 
       INNER JOIN MSP_WEB_STATUS_REPORTS 
          ON MSP_WEB_STATUS_RESPONSES.WSR_ID = MSP_WEB_STATUS_REPORTS.WSR_ID, 
       MSP_WEB_RESOURCES 
 Where MSP_WEB_STATUS_RESPONSES.WRESP_ID = @p0
   and MSP_WEB_RESOURCES.WRES_ID = MSP_WEB_STATUS_REPORTS.WRES_ID_MGR
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetStatusRepAndRespForRespID TO MSProjectServerRole
GO



/* Query #10062 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetStatusRepAndDueForResIDAndSRID
   @p0 INT,
   @p1 INT
AS
--Select MSP_WEB_STATUS_REPORTS.*,MSP_WEB_RESOURCES.RES_NAME,WDUE_ON From MSP_WEB_STATUS_REPORTS,MSP_WEB_RESOURCES,MSP_WEB_STATUS_REQUESTS Where WRES_IS_ENABLED<>0 and WREPORT_IS_ENABLED<>0 and MSP_WEB_STATUS_REQUESTS.WSR_ID=MSP_WEB_STATUS_REPORTS.WSR_ID and MSP_WEB_STATUS_REQUESTS.WRES_ID_RECEIVER=@p0 and MSP_WEB_STATUS_REQUESTS.WREQ_IS_SENT<>0 and MSP_WEB_STATUS_REPORTS.WSR_ID=@p1 and MSP_WEB_RESOURCES.WRES_ID=MSP_WEB_STATUS_REPORTS.WRES_ID_MGR RETURN
-- Conversion to ANSI INNER JOIN
Select MSP_WEB_STATUS_REPORTS.*, 
       MSP_WEB_RESOURCES.RES_NAME, 
       WDUE_ON 
  From MSP_WEB_STATUS_REQUESTS 
       INNER JOIN MSP_WEB_STATUS_REPORTS 
          ON MSP_WEB_STATUS_REQUESTS.WSR_ID = MSP_WEB_STATUS_REPORTS.WSR_ID, 
       MSP_WEB_RESOURCES 
 Where WRES_IS_ENABLED <> 0 
   and WREPORT_IS_ENABLED <> 0 
   and MSP_WEB_STATUS_REQUESTS.WRES_ID_RECEIVER = @p0
   and MSP_WEB_STATUS_REQUESTS.WREQ_IS_SENT <> 0 
   and MSP_WEB_STATUS_REPORTS.WSR_ID = @p1 
   and MSP_WEB_RESOURCES.WRES_ID = MSP_WEB_STATUS_REPORTS.WRES_ID_MGR
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetStatusRepAndDueForResIDAndSRID TO MSProjectServerRole
GO



/* Query #10063 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetReportNameFromSRID
   @p0 INT
AS
--Select WREPORT_NAME From MSP_WEB_STATUS_REPORTS Where WSR_ID=@p0 and WREPORT_IS_ENABLED<>0 RETURN
Select WREPORT_NAME 
  From MSP_WEB_STATUS_REPORTS 
 Where WSR_ID = @p0 
   and WREPORT_IS_ENABLED <> 0
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetReportNameFromSRID TO MSProjectServerRole
GO



/* Query #10064 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllResourcesOrderByName
AS
--Select WRES_ID,RES_NAME From MSP_WEB_RESOURCES Where WRES_IS_ENABLED<>0 Order By RES_NAME RETURN
Select WRES_ID, 
       RES_NAME 
  From MSP_WEB_RESOURCES 
 Where WRES_IS_ENABLED<>0
 Order By RES_NAME
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetAllResourcesOrderByName TO MSProjectServerRole
GO



/* Query #10065 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetStatusResponsesForRespIDAndUS
   @p0 INT,
   @p1 INT
AS
--Select * From MSP_WEB_STATUS_RESPONSES Where WUPDATE_STATUS=@p0 or WRESP_ID=@p1 RETURN
Select * 
  From MSP_WEB_STATUS_RESPONSES 
 Where WUPDATE_STATUS = @p0 
    or WRESP_ID = @p1
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetStatusResponsesForRespIDAndUS TO MSProjectServerRole
GO



/* Query #10066 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllReportsFromSRIDAndUnreq
   @p0 INT
AS
--Select * From MSP_WEB_STATUS_REPORTS Where WSR_ID=@p0 and WREPORT_UNREQUESTED<>0 and WREPORT_IS_ENABLED<>0 RETURN
Select * 
  From MSP_WEB_STATUS_REPORTS 
 Where WSR_ID = @p0 
   and WREPORT_UNREQUESTED <> 0 
   and WREPORT_IS_ENABLED <> 0
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetAllReportsFromSRIDAndUnreq TO MSProjectServerRole
GO



/* Query #10067 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetReportNameFromSResp
   @p0 INT
AS
--Select Distinct MSP_WEB_STATUS_REPORTS.WREPORT_NAME From MSP_WEB_STATUS_RESPONSES,MSP_WEB_STATUS_REPORTS Where MSP_WEB_STATUS_REPORTS.WSR_ID=MSP_WEB_STATUS_RESPONSES.WSR_ID and (WUPDATE_STATUS=-1 or (WSUBMIT_STATUS=0 and WUPDATE_STATUS=MSP_WEB_STATUS_RESPONSES.WRESP_ID)) and WRES_ID=@p0 and WREPORT_IS_ENABLED<>0 RETURN
-- Conversion to ANSI INNER JOIN
Select Distinct MSP_WEB_STATUS_REPORTS.WREPORT_NAME 
  From MSP_WEB_STATUS_RESPONSES 
       INNER JOIN MSP_WEB_STATUS_REPORTS 
          ON MSP_WEB_STATUS_REPORTS.WSR_ID = MSP_WEB_STATUS_RESPONSES.WSR_ID 
 Where (WUPDATE_STATUS = -1 
            or (WSUBMIT_STATUS = 0 
                   and WUPDATE_STATUS = MSP_WEB_STATUS_RESPONSES.WRESP_ID)) 
   and WRES_ID = @p0 
   and WREPORT_IS_ENABLED <> 0
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetReportNameFromSResp TO MSProjectServerRole
GO



/* Query #10068 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetResNameAndAllStatRespForDates
   @p0 INT,
   @p1 DATETIME,
   @p2 DATETIME,
   @p3 DATETIME,
   @p4 DATETIME,
   @p5 INT
AS
--Select RES_NAME,MSP_WEB_STATUS_RESPONSES.* From MSP_WEB_RESOURCES,MSP_WEB_STATUS_RESPONSES, MSP_WEB_STATUS_DISTRIBUTION Where WSR_ID=@p0 and WRESP_IS_MERGED<>0 and WSUBMIT_STATUS=2 and MSP_WEB_RESOURCES.WRES_ID=MSP_WEB_STATUS_RESPONSES.WRES_ID and MSP_WEB_STATUS_RESPONSES.WSRESP_PERIOD_START>=@p1 and MSP_WEB_STATUS_RESPONSES.WSRESP_PERIOD_START<@p2 and MSP_WEB_STATUS_RESPONSES.WSRESP_PERIOD_FINISH>=@p3 and MSP_WEB_STATUS_RESPONSES.WSRESP_PERIOD_FINISH<@p4 and MSP_WEB_STATUS_DISTRIBUTION.WRES_ID_DISTR_RECIP=@p5 and MSP_WEB_STATUS_RESPONSES.WRESP_ID=MSP_WEB_STATUS_DISTRIBUTION.WRESP_ID order by WSUBMIT_DATE RETURN
-- Conversion to ANSI INNER JOIN
Select RES_NAME, 
       MSP_WEB_STATUS_RESPONSES.* 
  From MSP_WEB_RESOURCES 
       INNER JOIN MSP_WEB_STATUS_RESPONSES 
          ON MSP_WEB_RESOURCES.WRES_ID = MSP_WEB_STATUS_RESPONSES.WRES_ID, 
       MSP_WEB_STATUS_DISTRIBUTION 
 Where WSR_ID = @p0 
   and WRESP_IS_MERGED <> 0 
   and WSUBMIT_STATUS = 2 
   and MSP_WEB_STATUS_RESPONSES.WSRESP_PERIOD_START >= @p1 
   and MSP_WEB_STATUS_RESPONSES.WSRESP_PERIOD_START < @p2 
   and MSP_WEB_STATUS_RESPONSES.WSRESP_PERIOD_FINISH >= @p3 
   and MSP_WEB_STATUS_RESPONSES.WSRESP_PERIOD_FINISH < @p4 
   and MSP_WEB_STATUS_DISTRIBUTION.WRES_ID_DISTR_RECIP = @p5 
   and MSP_WEB_STATUS_RESPONSES.WRESP_ID = MSP_WEB_STATUS_DISTRIBUTION.WRESP_ID 
 order by WSUBMIT_DATE
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetResNameAndAllStatRespForDates TO MSProjectServerRole
GO



/* Query #10069 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetDistinctRecipIDFromStatusReq
   @p0 INT
AS
--select distinct WRES_ID_RECEIVER, WREQ_IS_AUTOMERGE from MSP_WEB_STATUS_REQUESTS where WSR_ID=@p0 and WREQ_IS_ENABLED<>0 RETURN
select distinct WRES_ID_RECEIVER, 
                WREQ_IS_AUTOMERGE 
  from MSP_WEB_STATUS_REQUESTS 
 where WSR_ID = @p0 
   and WREQ_IS_ENABLED <> 0
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetDistinctRecipIDFromStatusReq TO MSProjectServerRole
GO



/* Query #10070 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllFromAssnID
   @p0 INT
AS
--Select * From MSP_WEB_ASSIGNMENTS Where WASSN_ID=@p0 RETURN
Select * 
  From MSP_WEB_ASSIGNMENTS 
 Where WASSN_ID = @p0
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetAllFromAssnID TO MSProjectServerRole
GO



/* Query #10071 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetFileIDProjectNameFromFiles
AS
--Select WPROJ_ID,PROJ_NAME,WRES_ID From MSP_WEB_PROJECTS Where WPROJ_IS_NONWORKING=0 Order By PROJ_NAME RETURN
Select WPROJ_ID, 
       PROJ_NAME, 
       WRES_ID 
  From MSP_WEB_PROJECTS 
 Where WPROJ_IS_NONWORKING = 0 
 Order By PROJ_NAME
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetFileIDProjectNameFromFiles TO MSProjectServerRole
GO



/* Query #10072 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetManagersFromResources
AS
--Select RES_NAME,WRES_ID From MSP_WEB_RESOURCES Where WRES_IS_MANAGER<>0 and WRES_IS_ENABLED<>0 Order By RES_NAME RETURN
Select RES_NAME, 
       WRES_ID 
  From MSP_WEB_RESOURCES 
 Where WRES_IS_MANAGER <> 0 
   and WRES_IS_ENABLED <> 0 
 Order By RES_NAME
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetManagersFromResources TO MSProjectServerRole
GO



/* Query #10076 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetMsgForRecipientID
   @p0 INT
AS
SELECT COUNT(WTRANS_ID) AS TNumTrans 
  from MSP_WEB_TRANSACTIONS 
       INNER JOIN MSP_WEB_ASSIGNMENTS 
          ON MSP_WEB_TRANSACTIONS.WASSN_ID = MSP_WEB_ASSIGNMENTS.WASSN_ID 
 WHERE WTRANS_STATE < 3 
   and WRES_ID_MGR = @p0
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetMsgForRecipientID TO MSProjectServerRole
GO



/* Query #10077 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetNewTaskRequests
   @p0 INT
AS
--Select TASK_NAME,WASSN_ID From MSP_WEB_ASSIGNMENTS Where WRES_ID_MGR=@p0 and WASSN_CREATED_BY_RES<>0 and WASSN_IS_CONFIRMED<>0 RETURN
Select TASK_NAME, 
       WASSN_ID 
  From MSP_WEB_ASSIGNMENTS 
 Where WRES_ID_MGR = @p0 
   and WASSN_CREATED_BY_RES <> 0 
   and WASSN_IS_CONFIRMED <> 0
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetNewTaskRequests TO MSProjectServerRole
GO



/* Query #10078 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetNewSrResponses
   @p0 INT
AS
--Select WRESP_ID From MSP_WEB_STATUS_RESPONSES,MSP_WEB_STATUS_REPORTS Where WRES_ID_MGR=@p0 and MSP_WEB_STATUS_RESPONSES.WSR_ID=MSP_WEB_STATUS_REPORTS.WSR_ID and WRESP_IS_NEW_RESPONSE<>0 and WREPORT_IS_ENABLED<>0 RETURN
Select WRESP_ID 
  From MSP_WEB_STATUS_RESPONSES, 
       MSP_WEB_STATUS_REPORTS 
 Where WRES_ID_MGR = @p0 
   and MSP_WEB_STATUS_RESPONSES.WSR_ID = MSP_WEB_STATUS_REPORTS.WSR_ID 
   and WRESP_IS_NEW_RESPONSE <> 0 
   and WREPORT_IS_ENABLED <> 0
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetNewSrResponses TO MSProjectServerRole
GO



/* Query #10079 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetNewSrRequests
   @p0 INT
AS
--Select WSR_ID From MSP_WEB_STATUS_REQUESTS Where WRES_ID_RECEIVER=@p0 and WREQ_IS_NEW_REQUEST<>0 and WREQ_IS_SENT<>0 RETURN
Select WSR_ID 
  From MSP_WEB_STATUS_REQUESTS 
 Where WRES_ID_RECEIVER = @p0 
   and WREQ_IS_NEW_REQUEST <> 0 
   and WREQ_IS_SENT <> 0
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetNewSrRequests TO MSProjectServerRole
GO



/* Query #10081 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllReportsFromSRID
   @p0 INT
AS
--Select * From MSP_WEB_STATUS_REPORTS Where WSR_ID=@p0 and WREPORT_IS_ENABLED<>0 RETURN
Select * 
  From MSP_WEB_STATUS_REPORTS 
 Where WSR_ID = @p0 
   and WREPORT_IS_ENABLED <> 0
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetAllReportsFromSRID TO MSProjectServerRole
GO



/* Query #10082 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetEmptyResource
AS
--Select * From MSP_WEB_RESOURCES Where WRES_ID=-1 and WRES_IS_ENABLED<>0 RETURN
Select * 
  From MSP_WEB_RESOURCES WITH (READPAST)
 Where WRES_ID = -1 
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetEmptyResource TO MSProjectServerRole
GO



/* Query #10083 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetRequestsFromSRID
   @p0 INT
AS
--Select * From MSP_WEB_STATUS_REQUESTS Where WSR_ID=@p0 Order By WRES_ID_RECEIVER RETURN
Select * 
  From MSP_WEB_STATUS_REQUESTS 
 Where WSR_ID = @p0 
 Order By WRES_ID_RECEIVER
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetRequestsFromSRID TO MSProjectServerRole
GO



/* Query #10085 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetSrDistFromRespID
   @p0 INT
AS
--Select * From MSP_WEB_STATUS_DISTRIBUTION Where WRESP_ID=@p0 RETURN
Select * 
  From MSP_WEB_STATUS_DISTRIBUTION 
 Where WRESP_ID = @p0
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetSrDistFromRespID TO MSProjectServerRole
GO



/* Query #10086 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllResources
AS
--Select WRES_ID,RES_NAME From MSP_WEB_RESOURCES where WRES_IS_ENABLED<>0 RETURN
Select WRES_ID, 
       RES_NAME 
  From MSP_WEB_RESOURCES 
 where WRES_IS_ENABLED <> 0
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetAllResources TO MSProjectServerRole
GO



/* Query #10087 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetResIDNameFromSrDist
   @p0 INT
AS
--Select RES_NAME,MSP_WEB_RESOURCES.WRES_ID From MSP_WEB_STATUS_DISTRIBUTION,MSP_WEB_RESOURCES Where MSP_WEB_RESOURCES.WRES_ID = MSP_WEB_STATUS_DISTRIBUTION.WRES_ID_DISTR_RECIP and MSP_WEB_STATUS_DISTRIBUTION.WRESP_ID=@p0 RETURN
-- Conversion to ANSI INNER JOIN
Select RES_NAME, 
       MSP_WEB_RESOURCES.WRES_ID 
  From MSP_WEB_STATUS_DISTRIBUTION 
       INNER JOIN MSP_WEB_RESOURCES 
          ON MSP_WEB_RESOURCES.WRES_ID = MSP_WEB_STATUS_DISTRIBUTION.WRES_ID_DISTR_RECIP 
 Where MSP_WEB_STATUS_DISTRIBUTION.WRESP_ID = @p0
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetResIDNameFromSrDist TO MSProjectServerRole
GO



/* Query #10088 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetActiveRequestsFromSRID
   @p0 INT
AS
--Select * From MSP_WEB_STATUS_REQUESTS Where WSR_ID=@p0 and WREQ_IS_ENABLED<>0 Order By WRES_ID_RECEIVER RETURN
Select * 
  From MSP_WEB_STATUS_REQUESTS 
 Where WSR_ID = @p0 
   and WREQ_IS_ENABLED <> 0 
 Order By WRES_ID_RECEIVER
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetActiveRequestsFromSRID TO MSProjectServerRole
GO



/* Query #10089 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetUnmatchedSRForSRID
   @p0 INT,
   @p1 INT
AS
--Select RES_NAME, MSP_WEB_STATUS_RESPONSES.*,MSP_WEB_STATUS_REPORTS.WREPORT_NAME From MSP_WEB_RESOURCES,MSP_WEB_STATUS_RESPONSES,MSP_WEB_STATUS_REPORTS,MSP_WEB_STATUS_DISTRIBUTION Where WRES_IS_ENABLED<>0 and WREPORT_IS_ENABLED<>0 and MSP_WEB_RESOURCES.WRES_ID=MSP_WEB_STATUS_RESPONSES.WRES_ID and MSP_WEB_STATUS_RESPONSES.WSR_ID=@p0 and MSP_WEB_STATUS_REPORTS.WSR_ID=MSP_WEB_STATUS_RESPONSES.WSR_ID and WRESP_IS_MATCHING=0 and MSP_WEB_STATUS_RESPONSES.WSUBMIT_STATUS=2 and (WUPDATE_STATUS=-1 or WUPDATE_STATUS = MSP_WEB_STATUS_RESPONSES.WRESP_ID) and MSP_WEB_STATUS_DISTRIBUTION.WRES_ID_DISTR_RECIP=@p1 and MSP_WEB_STATUS_RESPONSES.WRESP_ID=MSP_WEB_STATUS_DISTRIBUTION.WRESP_ID Order By MSP_WEB_STATUS_RESPONSES.WRES_ID,WSRESP_PERIOD_START RETURN
-- Conversion to ANSI INNER JOIN
Select RES_NAME, 
       MSP_WEB_STATUS_RESPONSES.*, 
       MSP_WEB_STATUS_REPORTS.WREPORT_NAME 
  From MSP_WEB_RESOURCES 
       INNER JOIN MSP_WEB_STATUS_RESPONSES 
          ON MSP_WEB_RESOURCES.WRES_ID = MSP_WEB_STATUS_RESPONSES.WRES_ID 
       INNER JOIN MSP_WEB_STATUS_REPORTS 
          ON MSP_WEB_STATUS_REPORTS.WSR_ID = MSP_WEB_STATUS_RESPONSES.WSR_ID, 
       MSP_WEB_STATUS_DISTRIBUTION 
 Where WRES_IS_ENABLED <> 0 
   and WREPORT_IS_ENABLED <> 0 
   and MSP_WEB_STATUS_RESPONSES.WSR_ID = @p0 
   and WRESP_IS_MATCHING = 0 
   and MSP_WEB_STATUS_RESPONSES.WSUBMIT_STATUS = 2 
   and (WUPDATE_STATUS = -1 
            or WUPDATE_STATUS = MSP_WEB_STATUS_RESPONSES.WRESP_ID) 
   and MSP_WEB_STATUS_DISTRIBUTION.WRES_ID_DISTR_RECIP = @p1 
   and MSP_WEB_STATUS_RESPONSES.WRESP_ID = MSP_WEB_STATUS_DISTRIBUTION.WRESP_ID 
 Order By MSP_WEB_STATUS_RESPONSES.WRES_ID, 
          WSRESP_PERIOD_START
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetUnmatchedSRForSRID TO MSProjectServerRole
GO



/* Query #10091 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetResNameAndAllStatRespForDatesResID
   @p0 INT,
   @p1 DATETIME,
   @p2 DATETIME,
   @p3 DATETIME,
   @p4 DATETIME,
   @p5 INT,
   @p6 INT
AS
--Select MSP_WEB_STATUS_RESPONSES.*,WRES_ID_MGR From MSP_WEB_STATUS_RESPONSES,MSP_WEB_STATUS_REPORTS, MSP_WEB_STATUS_DISTRIBUTION Where WREPORT_IS_ENABLED<>0 and MSP_WEB_STATUS_RESPONSES.WSR_ID=@p0 and WSUBMIT_STATUS=2 and MSP_WEB_STATUS_RESPONSES.WSRESP_PERIOD_START>=@p1 and MSP_WEB_STATUS_RESPONSES.WSRESP_PERIOD_START<@p2 and MSP_WEB_STATUS_RESPONSES.WSRESP_PERIOD_FINISH>=@p3 and MSP_WEB_STATUS_RESPONSES.WSRESP_PERIOD_FINISH<@p4 and MSP_WEB_STATUS_RESPONSES.WRES_ID=@p5 and MSP_WEB_STATUS_RESPONSES.WSR_ID=MSP_WEB_STATUS_REPORTS.WSR_ID and MSP_WEB_STATUS_DISTRIBUTION.WRES_ID_DISTR_RECIP=@p6 and MSP_WEB_STATUS_RESPONSES.WRESP_ID=MSP_WEB_STATUS_DISTRIBUTION.WRESP_ID order by WSUBMIT_DATE RETURN
-- Conversion to ANSI INNER JOIN
Select MSP_WEB_STATUS_RESPONSES.*, 
       WRES_ID_MGR 
  From MSP_WEB_STATUS_RESPONSES 
       INNER JOIN MSP_WEB_STATUS_REPORTS 
          ON MSP_WEB_STATUS_RESPONSES.WSR_ID = MSP_WEB_STATUS_REPORTS.WSR_ID 
       INNER JOIN MSP_WEB_STATUS_DISTRIBUTION 
          ON MSP_WEB_STATUS_RESPONSES.WRESP_ID = MSP_WEB_STATUS_DISTRIBUTION.WRESP_ID 
 Where WREPORT_IS_ENABLED <> 0 
   and MSP_WEB_STATUS_RESPONSES.WSR_ID = @p0 
   and WSUBMIT_STATUS = 2 
   and MSP_WEB_STATUS_RESPONSES.WSRESP_PERIOD_START >= @p1 
   and MSP_WEB_STATUS_RESPONSES.WSRESP_PERIOD_START < @p2 
   and MSP_WEB_STATUS_RESPONSES.WSRESP_PERIOD_FINISH >= @p3 
   and MSP_WEB_STATUS_RESPONSES.WSRESP_PERIOD_FINISH < @p4 
   and MSP_WEB_STATUS_RESPONSES.WRES_ID = @p5 
   and MSP_WEB_STATUS_DISTRIBUTION.WRES_ID_DISTR_RECIP = @p6 
 order by WSUBMIT_DATE
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetResNameAndAllStatRespForDatesResID TO MSProjectServerRole
GO



/* Query #10092 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetAutoMergeForRequest
   @p0 INT,
   @p1 INT
AS
--Select WREQ_IS_AUTOMERGE From MSP_WEB_STATUS_REQUESTS Where WSR_ID=@p0 and WRES_ID_RECEIVER=@p1 RETURN
Select WREQ_IS_AUTOMERGE 
  From MSP_WEB_STATUS_REQUESTS 
 Where WSR_ID = @p0 
   and WRES_ID_RECEIVER = @p1
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetAutoMergeForRequest TO MSProjectServerRole
GO



/* Query #10093 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllStatRespForDates
   @p0 INT,
   @p1 DATETIME,
   @p2 DATETIME,
   @p3 DATETIME,
   @p4 DATETIME
AS
--Select WRESP_IS_NEW_RESPONSE From MSP_WEB_STATUS_RESPONSES Where WSR_ID=@p0 and WRESP_IS_MERGED<>0 and WSUBMIT_STATUS=2 and WSRESP_PERIOD_START>=@p1 and WSRESP_PERIOD_START<@p2 and WSRESP_PERIOD_FINISH>=@p3 and WSRESP_PERIOD_FINISH<@p4 RETURN
Select WRESP_IS_NEW_RESPONSE 
  From MSP_WEB_STATUS_RESPONSES 
 Where WSR_ID = @p0 
   and WRESP_IS_MERGED <> 0 
   and WSUBMIT_STATUS = 2 
   and WSRESP_PERIOD_START >= @p1 
   and WSRESP_PERIOD_START < @p2 
   and WSRESP_PERIOD_FINISH >= @p3 
   and WSRESP_PERIOD_FINISH < @p4
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetAllStatRespForDates TO MSProjectServerRole
GO



/* Query #10094 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllStatRespForDatesResID
   @p0 INT,
   @p1 DATETIME,
   @p2 DATETIME,
   @p3 DATETIME,
   @p4 DATETIME,
   @p5 INT
AS
--Select WRESP_IS_NEW_RESPONSE,WRESP_IS_MERGED From MSP_WEB_STATUS_RESPONSES Where WSR_ID=@p0 and WSUBMIT_STATUS=2 and WSRESP_PERIOD_START>=@p1 and WSRESP_PERIOD_START<@p2 and WSRESP_PERIOD_FINISH>=@p3 and WSRESP_PERIOD_FINISH<@p4 and WRES_ID=@p5 RETURN
Select WRESP_IS_NEW_RESPONSE, 
       WRESP_IS_MERGED 
  From MSP_WEB_STATUS_RESPONSES 
 Where WSR_ID = @p0 
   and WSUBMIT_STATUS = 2 
   and WSRESP_PERIOD_START >= @p1 
   and WSRESP_PERIOD_START < @p2 
   and WSRESP_PERIOD_FINISH >= @p3 
   and WSRESP_PERIOD_FINISH < @p4 
   and WRES_ID = @p5
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetAllStatRespForDatesResID TO MSProjectServerRole
GO



/* Query #10095 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetNewRespForSRID
   @p0 INT
AS
--Select WRESP_ID,WSRESP_PERIOD_START,WSRESP_PERIOD_FINISH From MSP_WEB_STATUS_RESPONSES Where WSR_ID=@p0 and WRESP_IS_NEW_RESPONSE<>0 and WSUBMIT_STATUS=2 RETURN
Select WRESP_ID, 
       WSRESP_PERIOD_START, 
       WSRESP_PERIOD_FINISH 
  From MSP_WEB_STATUS_RESPONSES 
 Where WSR_ID = @p0 
   and WRESP_IS_NEW_RESPONSE <> 0 
   and WSUBMIT_STATUS = 2
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetNewRespForSRID TO MSProjectServerRole
GO



/* Query #10096 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetMaxDateForSRID
   @p0 INT
AS
--Select WSRESP_PERIOD_FINISH From MSP_WEB_STATUS_RESPONSES Where WSR_ID=@p0 and WSUBMIT_STATUS=2 and WRESP_IS_MATCHING<>0 Order By WSRESP_PERIOD_FINISH DESC RETURN
Select WSRESP_PERIOD_FINISH 
  From MSP_WEB_STATUS_RESPONSES 
 Where WSR_ID = @p0 
   and WSUBMIT_STATUS = 2 
   and WRESP_IS_MATCHING <> 0 
 Order By WSRESP_PERIOD_FINISH DESC
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetMaxDateForSRID TO MSProjectServerRole
GO



/* Query #10097 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetSubmittedResponsesForUpdateID
   @p0 INT
AS
--Select * From MSP_WEB_STATUS_RESPONSES Where WSUBMIT_STATUS=2 and WUPDATE_STATUS=@p0 RETURN
Select * 
  From MSP_WEB_STATUS_RESPONSES 
 Where WSUBMIT_STATUS = 2 
   and WUPDATE_STATUS = @p0
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetSubmittedResponsesForUpdateID TO MSProjectServerRole
GO



/* Query #10098 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllFreqForSRID
   @p0 INT
AS
--Select * From MSP_WEB_STATUS_FREQUENCIES Where WSR_ID=@p0 Order By WREPORT_START_DATE RETURN
Select * 
  From MSP_WEB_STATUS_FREQUENCIES 
 Where WSR_ID = @p0 
 Order By WREPORT_START_DATE
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetAllFreqForSRID TO MSProjectServerRole
GO



/* Query #10099 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllReportsFreqForSRID
   @p0 INT
AS
--Select MSP_WEB_STATUS_FREQUENCIES.*,MSP_WEB_STATUS_REPORTS.*, MSP_WEB_RESOURCES.RES_NAME From MSP_WEB_STATUS_FREQUENCIES,MSP_WEB_STATUS_REPORTS, MSP_WEB_RESOURCES Where WRES_IS_ENABLED<>0 and WREPORT_IS_ENABLED<>0 and MSP_WEB_STATUS_FREQUENCIES.WSR_ID=@p0 and MSP_WEB_STATUS_FREQUENCIES.WSR_ID=MSP_WEB_STATUS_REPORTS.WSR_ID and MSP_WEB_RESOURCES.WRES_ID=MSP_WEB_STATUS_REPORTS.WRES_ID_MGR Order By WREPORT_START_DATE RETURN
-- Conversion to ANSI INNER JOIN
Select MSP_WEB_STATUS_FREQUENCIES.*, 
       MSP_WEB_STATUS_REPORTS.*, 
       MSP_WEB_RESOURCES.RES_NAME 
  From MSP_WEB_STATUS_FREQUENCIES 
       INNER JOIN MSP_WEB_STATUS_REPORTS 
          ON MSP_WEB_STATUS_FREQUENCIES.WSR_ID = MSP_WEB_STATUS_REPORTS.WSR_ID, 
       MSP_WEB_RESOURCES 
 Where WRES_IS_ENABLED <> 0 
   and WREPORT_IS_ENABLED <> 0 
   and MSP_WEB_STATUS_FREQUENCIES.WSR_ID = @p0 
   and MSP_WEB_RESOURCES.WRES_ID = MSP_WEB_STATUS_REPORTS.WRES_ID_MGR 
 Order By WREPORT_START_DATE
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetAllReportsFreqForSRID TO MSProjectServerRole
GO



/* Query #10100 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetCurrentFreq
   @p0 INT,
   @p1 DATETIME
AS
--Select * From MSP_WEB_STATUS_FREQUENCIES Where WSR_ID=@p0 and WREPORT_START_DATE <= @p1 Order By WREPORT_START_DATE DESC RETURN
Select * 
  From MSP_WEB_STATUS_FREQUENCIES 
 Where WSR_ID = @p0 
   and WREPORT_START_DATE <= @p1 
 Order By WREPORT_START_DATE DESC
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetCurrentFreq TO MSProjectServerRole
GO



/* Query #10101 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetNewRespForSRIDToday
   @p0 INT,
   @p1 DATETIME,
   @p2 DATETIME,
   @p3 DATETIME,
   @p4 DATETIME
AS
--Select WRESP_ID,WRESP_IS_NEW_RESPONSE From MSP_WEB_STATUS_RESPONSES Where WSR_ID=@p0 and WSRESP_PERIOD_START>=@p1 and WSRESP_PERIOD_START<@p2 and WSRESP_PERIOD_FINISH>=@p3 and WSRESP_PERIOD_FINISH<@p4 and WSUBMIT_STATUS=2 and WRESP_IS_MATCHING<>0 RETURN
Select WRESP_ID, 
       WRESP_IS_NEW_RESPONSE 
  From MSP_WEB_STATUS_RESPONSES 
 Where WSR_ID = @p0 
   and WSRESP_PERIOD_START >= @p1 
   and WSRESP_PERIOD_START < @p2 
   and WSRESP_PERIOD_FINISH >= @p3 
   and WSRESP_PERIOD_FINISH < @p4 
   and WSUBMIT_STATUS = 2 
   and WRESP_IS_MATCHING <> 0
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetNewRespForSRIDToday TO MSProjectServerRole
GO



/* Query #10102 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetFlagMatchingForSRIDAfterDate
   @p0 INT,
   @p1 DATETIME,
   @p2 DATETIME
AS
--Select WRESP_IS_MATCHING From MSP_WEB_STATUS_RESPONSES Where WSUBMIT_STATUS=2 and WRESP_IS_MATCHING<>0 and WSR_ID=@p0 and WSRESP_PERIOD_START>=@p1 and WSRESP_PERIOD_START<@p2 RETURN
Select WRESP_IS_MATCHING 
  From MSP_WEB_STATUS_RESPONSES 
 Where WSUBMIT_STATUS = 2 
   and WRESP_IS_MATCHING <> 0 
   and WSR_ID = @p0 
   and WSRESP_PERIOD_START >= @p1 
   and WSRESP_PERIOD_START < @p2
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetFlagMatchingForSRIDAfterDate TO MSProjectServerRole
GO



/* Query #10103 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetSubmittedRespIDForSRID
   @p0 INT
AS
--Select WRESP_ID From MSP_WEB_STATUS_RESPONSES Where WSR_ID=@p0 and WSUBMIT_STATUS=2 RETURN
Select WRESP_ID 
  From MSP_WEB_STATUS_RESPONSES 
 Where WSR_ID = @p0 
   and WSUBMIT_STATUS != 0
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetSubmittedRespIDForSRID TO MSProjectServerRole
GO



/* Query #10104 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetRespForSRIDResPeriod
   @p0 INT,
   @p1 INT,
   @p2 DATETIME,
   @p3 DATETIME,
   @p4 DATETIME,
   @p5 DATETIME,
   @p6 INT
AS
--Select MSP_WEB_STATUS_RESPONSES.*,MSP_WEB_STATUS_REPORTS.WREPORT_NAME,MSP_WEB_RESOURCES.RES_NAME From MSP_WEB_STATUS_RESPONSES,MSP_WEB_STATUS_REPORTS,MSP_WEB_RESOURCES, MSP_WEB_STATUS_DISTRIBUTION Where WREPORT_IS_ENABLED<>0 and MSP_WEB_STATUS_RESPONSES.WSR_ID=@p0 and MSP_WEB_STATUS_RESPONSES.WRES_ID=@p1 and WSRESP_PERIOD_START>=@p2 and WSRESP_PERIOD_START<@p3 and WSRESP_PERIOD_FINISH>=@p4 and WSRESP_PERIOD_FINISH<@p5 and WSUBMIT_STATUS=2 and WRESP_IS_MATCHING<>0 and MSP_WEB_STATUS_RESPONSES.WSR_ID=MSP_WEB_STATUS_REPORTS.WSR_ID and MSP_WEB_STATUS_RESPONSES.WRES_ID=MSP_WEB_RESOURCES.WRES_ID and MSP_WEB_STATUS_DISTRIBUTION.WRES_ID_DISTR_RECIP=@p6 and MSP_WEB_STATUS_RESPONSES.WRESP_ID=MSP_WEB_STATUS_DISTRIBUTION.WRESP_ID Order By WSUBMIT_DATE RETURN
-- Conversion to ANSI INNER JOIN
Select MSP_WEB_STATUS_RESPONSES.*, 
       MSP_WEB_STATUS_REPORTS.WREPORT_NAME, 
       MSP_WEB_RESOURCES.RES_NAME 
  From MSP_WEB_STATUS_RESPONSES 
       INNER JOIN MSP_WEB_STATUS_REPORTS 
          ON MSP_WEB_STATUS_RESPONSES.WSR_ID = MSP_WEB_STATUS_REPORTS.WSR_ID 
       INNER JOIN MSP_WEB_RESOURCES 
          ON MSP_WEB_STATUS_RESPONSES.WRES_ID = MSP_WEB_RESOURCES.WRES_ID, 
       MSP_WEB_STATUS_DISTRIBUTION 
 Where WREPORT_IS_ENABLED <> 0 
   and MSP_WEB_STATUS_RESPONSES.WSR_ID = @p0 
   and MSP_WEB_STATUS_RESPONSES.WRES_ID = @p1 
   and WSRESP_PERIOD_START >= @p2 
   and WSRESP_PERIOD_START < @p3 
   and WSRESP_PERIOD_FINISH >= @p4 
   and WSRESP_PERIOD_FINISH < @p5 
   and WSUBMIT_STATUS = 2 
   and WRESP_IS_MATCHING <> 0 
   and MSP_WEB_STATUS_DISTRIBUTION.WRES_ID_DISTR_RECIP = @p6 
   and MSP_WEB_STATUS_RESPONSES.WRESP_ID = MSP_WEB_STATUS_DISTRIBUTION.WRESP_ID 
 Order By WSUBMIT_DATE
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetRespForSRIDResPeriod TO MSProjectServerRole
GO



/* Query #10105 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetRespUpdatesForRespID
   @p0 INT,
   @p1 DATETIME
AS
--Select MSP_WEB_STATUS_RESPONSES.* From MSP_WEB_STATUS_RESPONSES Where (WRESP_ID=@p0 or WUPDATE_STATUS=@p0) and WSUBMIT_STATUS=2 and WSUBMIT_DATE<=@p1 order by WSUBMIT_DATE RETURN
Select MSP_WEB_STATUS_RESPONSES.* 
  From MSP_WEB_STATUS_RESPONSES 
 Where (WRESP_ID = @p0 
            or WUPDATE_STATUS = @p0) 
   and WSUBMIT_STATUS = 2 
   and WSUBMIT_DATE <= @p1 
 order by WSUBMIT_DATE
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetRespUpdatesForRespID TO MSProjectServerRole
GO



/* Query #10106 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetResNameAndRespUpdatesForRespID
   @p0 INT,
   @p1 DATETIME,
   @p2 INT
AS
--Select MSP_WEB_STATUS_RESPONSES.*,WRES_ID_MGR From MSP_WEB_STATUS_REPORTS,MSP_WEB_STATUS_RESPONSES, MSP_WEB_STATUS_DISTRIBUTION Where WREPORT_IS_ENABLED<>0 and (MSP_WEB_STATUS_RESPONSES.WRESP_ID=@p0 or WUPDATE_STATUS=@p0) and WSUBMIT_STATUS=2 and WSUBMIT_DATE<=@p1 and MSP_WEB_STATUS_REPORTS.WSR_ID=MSP_WEB_STATUS_RESPONSES.WSR_ID and MSP_WEB_STATUS_DISTRIBUTION.WRES_ID_DISTR_RECIP=@p2 and MSP_WEB_STATUS_RESPONSES.WRESP_ID=MSP_WEB_STATUS_DISTRIBUTION.WRESP_ID order by WSUBMIT_DATE RETURN
Select MSP_WEB_STATUS_RESPONSES.*, 
       WRES_ID_MGR 
  From MSP_WEB_STATUS_REPORTS, 
       MSP_WEB_STATUS_RESPONSES, 
       MSP_WEB_STATUS_DISTRIBUTION 
 Where WREPORT_IS_ENABLED <> 0 
   and (MSP_WEB_STATUS_RESPONSES.WRESP_ID = @p0 
            or WUPDATE_STATUS = @p0) 
   and WSUBMIT_STATUS = 2 
   and WSUBMIT_DATE <= @p1 
   and MSP_WEB_STATUS_REPORTS.WSR_ID = MSP_WEB_STATUS_RESPONSES.WSR_ID 
   and MSP_WEB_STATUS_DISTRIBUTION.WRES_ID_DISTR_RECIP = @p2 
   and MSP_WEB_STATUS_RESPONSES.WRESP_ID = MSP_WEB_STATUS_DISTRIBUTION.WRESP_ID 
 order by WSUBMIT_DATE
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetResNameAndRespUpdatesForRespID TO MSProjectServerRole
GO



/* Query #10107 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllFreqForRespID
   @p0 INT
AS
--Select MSP_WEB_STATUS_FREQUENCIES.* From MSP_WEB_STATUS_FREQUENCIES, MSP_WEB_STATUS_RESPONSES Where WRESP_ID=@p0 and MSP_WEB_STATUS_FREQUENCIES.WSR_ID=MSP_WEB_STATUS_RESPONSES.WSR_ID Order By WREPORT_START_DATE RETURN
Select MSP_WEB_STATUS_FREQUENCIES.* 
  From MSP_WEB_STATUS_FREQUENCIES, 
       MSP_WEB_STATUS_RESPONSES 
 Where WRESP_ID = @p0 
   and MSP_WEB_STATUS_FREQUENCIES.WSR_ID = MSP_WEB_STATUS_RESPONSES.WSR_ID 
 Order By WREPORT_START_DATE
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetAllFreqForRespID TO MSProjectServerRole
GO



/* Query #10108 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetOtherSRIDForResID
   @p0 INT
AS
--Select MSP_WEB_STATUS_RESPONSES.WSR_ID From MSP_WEB_STATUS_REPORTS, MSP_WEB_STATUS_RESPONSES, MSP_WEB_RESOURCES, MSP_WEB_STATUS_DISTRIBUTION Where WRES_IS_ENABLED<>0 and WREPORT_IS_ENABLED<>0 and ((MSP_WEB_STATUS_REPORTS.WRES_ID_MGR=@p0 and MSP_WEB_STATUS_REPORTS.WREPORT_UNREQUESTED<>0) or (MSP_WEB_STATUS_RESPONSES.WRES_ID<>@p0)) and MSP_WEB_STATUS_DISTRIBUTION.WRESP_ID=MSP_WEB_STATUS_RESPONSES.WRESP_ID and WRES_ID_DISTR_RECIP=@p0 and (MSP_WEB_STATUS_RESPONSES.WUPDATE_STATUS=-1 or MSP_WEB_STATUS_RESPONSES.WUPDATE_STATUS=MSP_WEB_STATUS_RESPONSES.WRESP_ID) and MSP_WEB_STATUS_RESPONSES.WSUBMIT_STATUS=2 and MSP_WEB_STATUS_REPORTS.WSR_ID=MSP_WEB_STATUS_RESPONSES.WSR_ID and MSP_WEB_STATUS_RESPONSES.WRES_ID=MSP_WEB_RESOURCES.WRES_ID Order By MSP_WEB_STATUS_RESPONSES.WSUBMIT_DATE RETURN
-- Conversion to ANSI INNER JOIN
Select MSP_WEB_STATUS_RESPONSES.WSR_ID 
  From MSP_WEB_STATUS_REPORTS 
       INNER JOIN MSP_WEB_STATUS_RESPONSES 
          ON MSP_WEB_STATUS_REPORTS.WSR_ID = MSP_WEB_STATUS_RESPONSES.WSR_ID 
       INNER JOIN MSP_WEB_RESOURCES 
          ON MSP_WEB_STATUS_RESPONSES.WRES_ID = MSP_WEB_RESOURCES.WRES_ID 
       INNER JOIN MSP_WEB_STATUS_DISTRIBUTION 
          ON MSP_WEB_STATUS_DISTRIBUTION.WRESP_ID = MSP_WEB_STATUS_RESPONSES.WRESP_ID 
 Where WRES_IS_ENABLED <> 0 
   and WREPORT_IS_ENABLED <> 0 
   and ((MSP_WEB_STATUS_REPORTS.WRES_ID_MGR = @p0 
             and MSP_WEB_STATUS_REPORTS.WREPORT_UNREQUESTED <> 0) 
            or (MSP_WEB_STATUS_RESPONSES.WRES_ID <> @p0)) 
   and WRES_ID_DISTR_RECIP = @p0 
   and (MSP_WEB_STATUS_RESPONSES.WUPDATE_STATUS = -1 
            or MSP_WEB_STATUS_RESPONSES.WUPDATE_STATUS = MSP_WEB_STATUS_RESPONSES.WRESP_ID) 
   and MSP_WEB_STATUS_RESPONSES.WSUBMIT_STATUS = 2 
 Order By MSP_WEB_STATUS_RESPONSES.WSUBMIT_DATE
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetOtherSRIDForResID TO MSProjectServerRole
GO



/* Query #10109 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetDistinctCustomFieldsForResId
   @p0 INT
AS
--Select Distinct MSP_WEB_WORKGROUP_FIELDS_INFO.CUSTFIELD_INFO_ID,CUSTFIELD_NAME From MSP_WEB_WORKGROUP_FIELDS_INFO, MSP_WEB_PROJECT_WORKGROUP_INFO, MSP_WEB_ASSIGNMENTS, MSP_WEB_WORKGROUP_FIELDS Where MSP_WEB_WORKGROUP_FIELDS_INFO.FIELD_ID=MSP_WEB_WORKGROUP_FIELDS.FIELD_ID and MSP_WEB_ASSIGNMENTS.WASSN_ID=MSP_WEB_WORKGROUP_FIELDS.WASSN_ID and MSP_WEB_WORKGROUP_FIELDS_INFO.CUSTFIELD_INFO_ID=MSP_WEB_PROJECT_WORKGROUP_INFO.CUSTFIELD_INFO_ID and MSP_WEB_PROJECT_WORKGROUP_INFO.WPROJ_ID=MSP_WEB_ASSIGNMENTS.WPROJ_ID and MSP_WEB_ASSIGNMENTS.WRES_ID=@p0 Order By MSP_WEB_WORKGROUP_FIELDS_INFO.CUSTFIELD_INFO_ID RETURN
Select Distinct MSP_WEB_WORKGROUP_FIELDS_INFO.CUSTFIELD_INFO_ID, 
                CUSTFIELD_NAME 
  From MSP_WEB_WORKGROUP_FIELDS_INFO, 
       MSP_WEB_PROJECT_WORKGROUP_INFO, 
       MSP_WEB_ASSIGNMENTS, 
       MSP_WEB_WORKGROUP_FIELDS 
 Where MSP_WEB_WORKGROUP_FIELDS_INFO.FIELD_ID = MSP_WEB_WORKGROUP_FIELDS.FIELD_ID 
   and MSP_WEB_ASSIGNMENTS.WASSN_ID = MSP_WEB_WORKGROUP_FIELDS.WASSN_ID 
   and MSP_WEB_WORKGROUP_FIELDS_INFO.CUSTFIELD_INFO_ID = MSP_WEB_PROJECT_WORKGROUP_INFO.CUSTFIELD_INFO_ID 
   and MSP_WEB_PROJECT_WORKGROUP_INFO.WPROJ_ID = MSP_WEB_ASSIGNMENTS.WPROJ_ID 
   and MSP_WEB_ASSIGNMENTS.WRES_ID = @p0 
 Order By MSP_WEB_WORKGROUP_FIELDS_INFO.CUSTFIELD_INFO_ID
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetDistinctCustomFieldsForResId TO MSProjectServerRole
GO



/* Query #10111 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetOtherResponsesForResID
   @p0 INT
AS
--Select MSP_WEB_STATUS_RESPONSES.*,MSP_WEB_STATUS_REPORTS.WREPORT_NAME,MSP_WEB_RESOURCES.RES_NAME, MSP_WEB_RESOURCES.WRES_ID  From MSP_WEB_STATUS_REPORTS, MSP_WEB_STATUS_RESPONSES, MSP_WEB_RESOURCES, MSP_WEB_STATUS_DISTRIBUTION Where WREPORT_IS_ENABLED<>0 and ((MSP_WEB_STATUS_REPORTS.WRES_ID_MGR=@p0 and MSP_WEB_STATUS_REPORTS.WREPORT_UNREQUESTED<>0) or (WRES_ID_MGR<>@p0 and MSP_WEB_STATUS_RESPONSES.WRES_ID<>@p0)) and MSP_WEB_STATUS_DISTRIBUTION.WRESP_ID=MSP_WEB_STATUS_RESPONSES.WRESP_ID and WRES_ID_DISTR_RECIP=@p0 and MSP_WEB_STATUS_RESPONSES.WSUBMIT_STATUS=2 and MSP_WEB_STATUS_REPORTS.WSR_ID=MSP_WEB_STATUS_RESPONSES.WSR_ID and MSP_WEB_STATUS_RESPONSES.WRES_ID=MSP_WEB_RESOURCES.WRES_ID Order By MSP_WEB_STATUS_RESPONSES.WSUBMIT_DATE RETURN
-- Conversion to ANSI INNER JOIN
Select MSP_WEB_STATUS_RESPONSES.*, 
       MSP_WEB_STATUS_REPORTS.WREPORT_NAME, 
       MSP_WEB_RESOURCES.RES_NAME, 
       MSP_WEB_RESOURCES.WRES_ID 
  From MSP_WEB_STATUS_REPORTS 
       INNER JOIN MSP_WEB_STATUS_RESPONSES 
          ON MSP_WEB_STATUS_REPORTS.WSR_ID = MSP_WEB_STATUS_RESPONSES.WSR_ID 
       INNER JOIN MSP_WEB_RESOURCES 
          ON MSP_WEB_STATUS_RESPONSES.WRES_ID = MSP_WEB_RESOURCES.WRES_ID 
       INNER JOIN MSP_WEB_STATUS_DISTRIBUTION 
          ON MSP_WEB_STATUS_DISTRIBUTION.WRESP_ID = MSP_WEB_STATUS_RESPONSES.WRESP_ID 
 Where WREPORT_IS_ENABLED <> 0 
   and ((MSP_WEB_STATUS_REPORTS.WRES_ID_MGR = @p0 
             and MSP_WEB_STATUS_REPORTS.WREPORT_UNREQUESTED <> 0) 
            or (WRES_ID_MGR <> @p0 
                   and MSP_WEB_STATUS_RESPONSES.WRES_ID <> @p0)) 
   and WRES_ID_DISTR_RECIP = @p0 
   and MSP_WEB_STATUS_RESPONSES.WSUBMIT_STATUS = 2 
 Order By MSP_WEB_STATUS_RESPONSES.WSUBMIT_DATE
RETURN
GO

GRANT EXECUTE ON dbo.MSP_WEB_SP_QRY_GetOtherResponsesForResID TO MSProjectServerRole
GO



/* Query #10112 */
CREATE PROCEDURE dbo.MSP_WEB_SP_QRY_GetAllResponsesResNameForSRID
   @p0 INT
AS
--Select MSP_WEB_STATUS_RESPONSES.*,WRES_ID_MGR From MSP_WEB_STATUS_RESPONSES, MSP_WEB_STATUS_REPORTS Where WREPORT_IS_ENABLED<>0 and MSP_WEB_STATUS_RESPONSES.WSR_ID=@p0 and WSUBMIT_STATUS=2 and MSP_WEB_STATUS_RESPONSES.WSR_ID=MSP_WEB_STATUS_REPORTS.WSR_ID Order By WSUBMIT_DATE RETURN
