Global Refactor (rename) tables/views/procs in dependent views/procs
SQL Complete has an option to do renames within the current script. It would be great to support refactoring (rename) tables/views/procs/functions in dependent views/procs/funtions.
For instance:
CREATE TABLE dbo.Test (a INT, b INT, CONSTRAINT [PKdboTest] PRIMARY KEY (a))
GO
CREATE VIEW dbo.vwTest
AS
SELECT * FROM dbo.Test
GO
CREATE PROC dbo.spUpdateTest
(
@a int,
@b int
)
as
UPDATE dbo.Test
SET b = @b
WHERE a = @a
GO
On a separate screen (or from SSMS object explorer) choose refactor and change table name from "dbo.Test" to "dbo.GoodTableName" and SQL Complete would identify all objects where dbo.Test is referenced and would create a script to rename table, Primary Key, Foreign Key, Indexes, and views, procs, functions with new table name.