CREATE PROCEDURE DBO.DeleteProduct @OldProductNumber INT AS
SET NOCOUNT ON

DELETE FROM ProductPrice WHERE ProductNumber = @OldProductNumber

DELETE ProductPricePeriod WHERE FK_ProductNumber = @OldProductNumber

DELETE FROM ProductPOSXTab WHERE ProductNumber = @OldProductNumber

DELETE FROM ProductSegmentsXTAB WHERE ProductNumber = @OldProductNumber

DELETE FROM ProductMinimumAvailableRoomsXTAB WHERE ProductNumber = @OldProductNumber

DELETE FROM Products WHERE ProductNumber = @OldProductNumber
