Share via

Conditions based delete

Vineet S 1,390 Reputation points
2024-08-02T02:14:22.45+00:00

Hi, If in lookup of the source data we find company code x then it should delete the data related to same company code in target database table ... Please help with screenshot

Azure Data Factory
Azure Data Factory

An Azure service for ingesting, preparing, and transforming data at scale.

0 comments No comments

Answer accepted by question author
  1. Nandan Hegde 36,796 Reputation points MVP Volunteer Moderator
    2024-08-02T03:18:29.1166667+00:00

    You can create a Stored procedure with parameter and leverage SP activity for the same wherein you pass the company code value:

    CREATE PROCEDURE dbo.TestSP @CompanyCode nvarchar(30)
    AS
    Delete from dbo.tablename
    WHERE CompanyCode
     = @CompanyCode
    GO
    

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.