AlexPonnath
asked on
SysTable info
Which systable holds information on which fields will be returned by a given stored procedure ?
I can find the parameter fields but have no luck finding the returned fields..
Alex
I can find the parameter fields but have no luck finding the returned fields..
Alex
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Whta's the benefit of going like that.. You can easily identify ypur return value from the procedure itself ...
ASKER
Your below query returns the stored procedure name but that still doesnt help me much since i knew the id before
SELECT OBJECT_NAME(id)
FROM syscomments
WHERE [text] LIKE '%column name%'
AND OBJECTPROPERTY(id, 'IsProcedure') = 1
GROUP BY OBJECT_NAME(id)
so my problem is that there seems to be no easy way to parse out the column names from the stored procedure.
Is there another way to do this ?
SELECT OBJECT_NAME(id)
FROM syscomments
WHERE [text] LIKE '%column name%'
AND OBJECTPROPERTY(id, 'IsProcedure') = 1
GROUP BY OBJECT_NAME(id)
so my problem is that there seems to be no easy way to parse out the column names from the stored procedure.
Is there another way to do this ?
No, there is no simple way to do that as far as I know. Your best bet is what aneeshattingal mentioned - open each stored procedures to see what it does.
SELECT OBJECT_NAME(id)
FROM syscomments
WHERE [text] LIKE '%column name%'
AND OBJECTPROPERTY(id, 'IsProcedure') = 1
GROUP BY OBJECT_NAME(id)