Курсовая работа: Контроль и учет технического состояния магистральных трубопроводов транспортирующих огнеопасные продукты
DiagnosticPartsPipeline on PartsPipeline.id_PartsPipeline = DiagnosticPartsPipeline.id_PartsPipeline)
where Pipeline.id_Pipeline=@id)
Delete from RepairPartsPipeline where
RepairPartsPipeline.id_RepairPartsPipeline in
(select RepairPartsPipeline.id_RepairPartsPipeline from
((Pipeline inner join PartsPipeline on Pipeline.id_Pipeline = PartsPipeline.id_Pipeline) inner join
RepairPartsPipeline on PartsPipeline.id_PartsPipeline = RepairPartsPipeline.id_PartsPipeline)
where Pipeline.id_Pipeline=@id)
DELETE FROM PartsPipeline
WHERE Id_Pipeline=@id
DELETE FROM Pipeline
WHERE Id_Pipeline=@Id
GO
Хранимая процедура для удаления записи из таблицы «Транспортируемые продукты» :
CREATE PROCEDURE SPDelDic_ClassTransportProductTE(@idrec uniqueidentifier) AS
DECLARE @ins_error int, @ROWCOUNT int
BEGIN TRANSACTION TranName
DELETE FROM DIC_CLASSTRANSPORTPRODUCTTE
WHERE Id_Dic_ClassTrans