Código SQL:
Ver originalCREATE TABLE test(
id INT
)
CREATE TABLE test2(
id INT
)
INSERT INTO test VALUES (1)
INSERT INTO test VALUES (2)
INSERT INTO test VALUES (3)
INSERT INTO test2 VALUES (1)
INSERT INTO test2 VALUES (2)
INSERT INTO test2 VALUES (3)
ALTER PROCEDURE sp_test1
AS
SELECT * FROM test
EXEC sp_test2
CREATE PROCEDURE sp_test2
AS
SELECT * FROM test2
SELECT SPECIFIC_NAME + 'manda llamar a sp_test2 ' FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_DEFINITION LIKE '%sp_test2%' AND SPECIFIC_NAME NOT LIKE '%sp_test2%'
saludos!