IF EXISTS ( SELECT * 
            FROM   sysobjects 
            WHERE  id = object_id(N'[dbo].[sp_STUD1_GetProfileEmailAddresses]') 
                   and OBJECTPROPERTY(id, N'IsProcedure') = 1 )
    DROP PROCEDURE [dbo].[sp_STUD1_GetProfileEmailAddresses]


IF EXISTS ( SELECT * 
            FROM   sys.views 
            WHERE  name='pal_vRemittanceListing' and type='v')
BEGIN
    DROP VIEW [dbo].[pal_vRemittanceListing]
END


IF EXISTS ( SELECT * 
            FROM   sysobjects 
            WHERE  id = object_id(N'[dbo].[sp_DebtorsAgeReportResult]') 
                   and OBJECTPROPERTY(id, N'IsProcedure') = 1 )
    DROP PROCEDURE [dbo].[sp_DebtorsAgeReportResult]


IF EXISTS ( SELECT * 
            FROM   sysobjects 
            WHERE  id = object_id(N'[dbo].[sp_DebtorsAgeReport]') 
                   and OBJECTPROPERTY(id, N'IsProcedure') = 1 )
    DROP PROCEDURE [dbo].[sp_DebtorsAgeReport]



IF NOT EXISTS(SELECT * FROM sys.columns 
		WHERE Name = N'disclaimer'
		AND Object_ID = Object_ID(N'pal_MSEra'))
BEGIN
	ALTER TABLE dbo.pal_MSEra 
		ADD	disclaimer nvarchar(600) NULL;
END


IF EXISTS ( SELECT * 
            FROM   sysobjects 
            WHERE  id = object_id(N'[dbo].[sp_Tasks]') 
                   and OBJECTPROPERTY(id, N'IsProcedure') = 1 )
    DROP PROCEDURE [dbo].[sp_Tasks]