added improvements on set proces and minor other improvements
This commit is contained in:
@@ -20,19 +20,19 @@ BEGIN
|
||||
IF @referencetable = 'mfr__companies'
|
||||
BEGIN
|
||||
DELETE p
|
||||
OUTput deleted.*, @now INTO [dbo].[mfr__d_*PartnerSet]
|
||||
--OUTput deleted.*, @now INTO [dbo].[mfr__d_*PartnerSet]
|
||||
FROM [dbo].[mfr__*PartnerSet] as p
|
||||
WHERE p.Property like 'Company[:]%' AND EXISTS (SELECT * FROM @tmp as tmp where tmp.[id] = p.[EntityId]);
|
||||
DELETE cv
|
||||
OUTput deleted.*, @now INTO [dbo].[mfr__d_#customvalues]
|
||||
--OUTput deleted.*, @now INTO [dbo].[mfr__d_#customvalues]
|
||||
FROM [dbo].[mfr__#customvalues] as cv
|
||||
WHERE cv.Property like 'Company[:]%' AND EXISTS (SELECT * FROM @tmp as tmp where tmp.[id] = cv.[EntityId]);
|
||||
DELETE lc
|
||||
OUTPUT deleted.*, @now INTO [dbo].[mfr__d_#locations]
|
||||
--OUTPUT deleted.*, @now INTO [dbo].[mfr__d_#locations]
|
||||
FROM [dbo].[mfr__#locations] as lc
|
||||
WHERE lc.Property like 'Company[:]%' AND EXISTS (SELECT * FROM @tmp as tmp where tmp.[id] = lc.[EntityId]);
|
||||
DELETE cm
|
||||
OUTPUT deleted.*, @now INTO [dbo].[mfr__d_comments]
|
||||
--OUTPUT deleted.*, @now INTO [dbo].[mfr__d_comments]
|
||||
FROM [dbo].[mfr__comments] as cm
|
||||
WHERE EXISTS (SELECT * FROM @tmp as tmp where tmp.[id] = cm.[CompanyId] AND ISNULL(cm.[ServiceRequestId],0) = 0);
|
||||
END
|
||||
|
||||
Reference in New Issue
Block a user