IF EXISTS (SELECT * FROM sysobjects
Where name = 'sp_GetSalesData')
BEGIN
DROP PROCEDURE [dbo].[sp_GetSalesData]
END


IF EXISTS (SELECT * FROM sysobjects
Where name = 'sp_GetSalesInvoicesToAllocate')
BEGIN
DROP PROCEDURE [dbo].[sp_GetSalesInvoicesToAllocate]
END


IF EXISTS (SELECT * FROM sysobjects
Where name = 'sp_GetSalesQuotesToAllocate')
BEGIN

DROP PROCEDURE [dbo].[sp_GetSalesQuotesToAllocate]

END

IF EXISTS (SELECT * FROM sysobjects
Where name = 'v_SalesView')
BEGIN
DROP VIEW [dbo].[v_SalesView]
END