Stored Procedures [dbo].[MssWebDeleteOrderThirdPartyService]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnYes
Parameters
NameData TypeMax Length (Bytes)
@inIdint4
@inOrderIdint4
Permissions
TypeActionOwning Principal
GrantExecuteMssExec
SQL Script
CREATE PROCEDURE [dbo].[MssWebDeleteOrderThirdPartyService]
@inId INT,
@inOrderId int
AS
update Orders set JobCostingCalculated = 0
from OrderThirdPartys
inner join Orders on OrderThirdPartys.OrdPriKey = Orders.PriKey and  Orders.PriKey =@inOrderId
where OrdThirdPartyPriKey = @inId AND Orders.ReleaseDate is null
DELETE FROM OrderThirdPartys WHERE OrdThirdPartyPriKey = @inId AND OrdPriKey=@inOrderId
GO
GRANT EXECUTE ON  [dbo].[MssWebDeleteOrderThirdPartyService] TO [MssExec]
GO
Uses