IF EXISTS(select * FROM sys.views where name = 'pal_vAccountClaimHistory')
BEGIN DROP VIEW pal_vAccountClaimHistory END
IF EXISTS(select * FROM sys.views where name = 'v_AccountClaimHistory')
BEGIN DROP VIEW v_AccountClaimHistory END

IF EXISTS(select * FROM sys.views where name = 'pal_vAccountClaimHistoryLog')
BEGIN DROP VIEW pal_vAccountClaimHistoryLog END
IF EXISTS(select * FROM sys.views where name = 'v_AccountClaimHistoryLog')
BEGIN DROP VIEW v_AccountClaimHistoryLog END

IF EXISTS(select * FROM sys.views where name = 'pal_vAccountClaimResponseDetail')
BEGIN DROP VIEW pal_vAccountClaimResponseDetail END
IF EXISTS(select * FROM sys.views where name = 'v_AccountClaimResponseDetail')
BEGIN DROP VIEW v_AccountClaimResponseDetail END

IF EXISTS(select * FROM sys.views where name = 'pal_vAccountClaimResponseErrors')
BEGIN DROP VIEW pal_vAccountClaimResponseErrors END
IF EXISTS(select * FROM sys.views where name = 'v_AccountClaimResponseErrors')
BEGIN DROP VIEW v_AccountClaimResponseErrors END

IF EXISTS(select * FROM sys.views where name = 'pal_vAccountClaimResponseHeader')
BEGIN DROP VIEW pal_vAccountClaimResponseHeader END
IF EXISTS(select * FROM sys.views where name = 'v_AccountClaimResponseHeader')
BEGIN DROP VIEW v_AccountClaimResponseHeader END

IF EXISTS(select * FROM sys.views where name = 'pal_vAccountsClaimable')
BEGIN DROP VIEW pal_vAccountsClaimable END
IF EXISTS(select * FROM sys.views where name = 'v_AccountsClaimable')
BEGIN DROP VIEW v_AccountsClaimable END

IF EXISTS(select * FROM sys.views where name = 'pal_vAccountsVerifiedMSV')
BEGIN DROP VIEW pal_vAccountsVerifiedMSV END
IF EXISTS(select * FROM sys.views where name = 'v_AccountsVerifiedMSV')
BEGIN DROP VIEW v_AccountsVerifiedMSV END

IF EXISTS(select * FROM sys.views where name = 'pal_vCreditListing')
BEGIN DROP VIEW pal_vCreditListing END
IF EXISTS(select * FROM sys.views where name = 'v_CreditListing')
BEGIN DROP VIEW v_CreditListing END

IF EXISTS(select * FROM sys.views where name = 'pal_vDebitListing')
BEGIN DROP VIEW pal_vDebitListing END
IF EXISTS(select * FROM sys.views where name = 'v_DebitListing')
BEGIN DROP VIEW v_DebitListing END

IF EXISTS(select * FROM sys.views where name = 'pal_vInvoiceListing')
BEGIN DROP VIEW pal_vInvoiceListing END
IF EXISTS(select * FROM sys.views where name = 'v_InvoiceListing')
BEGIN DROP VIEW v_InvoiceListing END

IF EXISTS(select * FROM sys.views where name = 'pal_vLoyaltyDetail')
BEGIN DROP VIEW pal_vLoyaltyDetail END
IF EXISTS(select * FROM sys.views where name = 'v_LoyaltyDetail')
BEGIN DROP VIEW v_LoyaltyDetail END

IF EXISTS(select * FROM sys.views where name = 'pal_vMedicalPatientSubjectiveDetails')
BEGIN DROP VIEW pal_vMedicalPatientSubjectiveDetails END
IF EXISTS(select * FROM sys.views where name = 'v_MedicalPatientSubjectiveDetails')
BEGIN DROP VIEW v_MedicalPatientSubjectiveDetails END

IF EXISTS(select * FROM sys.views where name = 'pal_vNoteDetail')
BEGIN DROP VIEW pal_vNoteDetail END
IF EXISTS(select * FROM sys.views where name = 'v_NoteDetail')
BEGIN DROP VIEW v_NoteDetail END

IF EXISTS(select * FROM sys.views where name = 'pal_vReceiptListing')
BEGIN DROP VIEW pal_vReceiptListing END
IF EXISTS(select * FROM sys.views where name = 'v_ReceiptListing')
BEGIN DROP VIEW v_ReceiptListing END

IF EXISTS(select * FROM sys.views where name = 'pal_vReconByFiscalPeriod')
BEGIN DROP VIEW pal_vReconByFiscalPeriod END
IF EXISTS(select * FROM sys.views where name = 'v_ReconByFiscalPeriod')
BEGIN DROP VIEW v_ReconByFiscalPeriod END

IF EXISTS(select * FROM sys.views where name = 'pal_vSalesView')
BEGIN DROP VIEW pal_vSalesView END
IF EXISTS(select * FROM sys.views where name = 'v_SalesView')
BEGIN DROP VIEW v_SalesView END

IF EXISTS(select * FROM sys.views where name = 'pal_vUserShared')
BEGIN DROP VIEW pal_vUserShared END
IF EXISTS(select * FROM sys.views where name = 'v_UserShared')
BEGIN DROP VIEW v_UserShared END

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

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

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

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

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

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

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

