How can we help you today? How can we help you today?

Column Smart Rename not finding dependencies in SPs with MERGE

Hi,

using smart rename feature to rename a column is not finding stored procedures where the column being renamed is part of a MERGE Statement.

example to reproduce issue:

CREATE TABLE dbo.[testtable1]
(
   testcol INT,
   mergedcol INT
);
GO
CREATE TABLE dbo.[testtable2]
(
   testcol2 INT,
   mergedcol2 INT
);
GO
CREATE PROCEDURE testmerge
AS
BEGIN
   MERGE dbo.[testtable1] AS tgt
   USING dbo.[testtable2] AS src
   ON (tgt.[testcol] = src.[testcol2])
   WHEN MATCHED THEN
       UPDATE SET tgt.[mergedcol] = src.[mergedcol2]
   WHEN NOT MATCHED BY TARGET THEN
       INSERT
       (
           [testcol],
           mergedcol
       )
       VALUES
       (src.[testcol2], src.[mergedcol2]);
END;
GO
MagedK
0

Comments

1 comment

  • Christian Perez
    Official comment

    Hello MagedK, 

     

    Hope you are doing well this morning and apologies for the slight delay in response here. I was able to take the replication steps that you were kind enough to share me and get a replication in my sandbox environment going, so I am going to escalate this behavior to the developers to be remediated.

     

    Once I know more about a planned fix or remediation steps for this issue I will circle back here and let you know about next steps.

    Christian Perez

Add comment

Please sign in to leave a comment.