This stored procedure is in a string variable and I want to retrieve the name.
CREATE PROCEDURE dbo.uspGetEmployeesTest2
@LastName nvarchar(50),
@FirstName nvarchar(50)
AS
SET NOCOUNT ON;
SELECT
FirstName, LastName, Department
FROM
HumanResources.vEmployeeDepartmentHistory
WHERE
FirstName = @FirstName
AND LastName = @LastName
AND EndDate IS NULL;
GO
I would like it to work event if the header looks like that :
CREATE PROCEDURE [dbo].[uspGetEmployeesTest2]
I would like to get : uspGetEmployeesTest2
Is there any library to to this ?