I'm currently running the
sp_stored_procedures
stored procedure to retrieve a listing of SP for a given data source. I will need to query this dataset by it's PROCEDURE_NAME and PROCEDURE_OWNER columns. However, PROCEDURE_NAME seems to have a strange return value. It seems to append a semicolon and a number to the end of the name.
sel_AppUser;1
sel_AppUser_all;1
sel_AppUser_by_login;1
sel_Browsable;1
Here's sel_Browsable
CREATE PROCEDURE [dbo].[sel_Browsable]
@BrowsableID uniqueidentifier
AS
BEGIN
SELECT * FROM Browsable WHERE browsableID = @BrowsableID FOR XML AUTO, ELEMENTS
SELECT * FROM Attribute WHERE objectID = @BrowsableID FOR XML AUTO, ELEMENTS
SELECT * FROM Search WHERE browsableID = @BrowsableID ORDER BY searchOrder FOR XML AUTO, ELEMENTS
SELECT Attribute.* FROM Attribute INNER JOIN Search ON Attribute.objectID = Search.searchID WHERE browsableID = @BrowsableID ORDER BY searchOrder FOR XML AUTO, ELEMENTS
SELECT Criterion.* FROM Criterion INNER JOIN Search ON Criterion.searchID = Search.searchID WHERE browsableID = @BrowsableID ORDER BY searchOrder, criterionOrder FOR XML AUTO, ELEMENTS
SELECT Attribute.* FROM Attribute INNER JOIN Criterion ON Attribute.objectID = Criterion.criterionID INNER JOIN Search ON Criterion.searchID = Search.searchID WHERE browsableID = @BrowsableID ORDER BY searchOrder, criterionOrder FOR XML AUTO, ELEMENTS
SELECT CriterionOperator.* FROM CriterionOperator INNER JOIN Criterion ON CriterionOperator.criterionID = Criterion.criterionID INNER JOIN Search ON Criterion.searchID = Search.searchID WHERE browsableID = @BrowsableID ORDER BY searchOrder, criterionOrder, operatorOrder FOR XML AUTO, ELEMENTS
SELECT CriterionValue.* FROM CriterionValue INNER JOIN Criterion ON CriterionValue.criterionID = Criterion.criterionID INNER JOIN Search ON Criterion.searchID = Search.searchID WHERE browsableID = @BrowsableID ORDER BY searchOrder, criterionOrder, criterionValueOrder FOR XML AUTO, ELEMENTS
END
Initially I thought that these numbers might represent the number of parameters (until NUM_INPUT_PARAMS is implemented in SQL Server) but I've added and removed parameters and haven't seen a change in the listing.
What do these numbers mean?