Get the contents of Store Procedure, Scalar and Table Valued Function

Niladri.biswas
Posted by Niladri.biswas under Sql Server category on | Points: 40 | Views : 1854
SELECT 
[Object Name] = o.Name
,[Object Type] = o.Type_Desc
,[Content In Text Mode] = c.Text
,[Content In Xml Mode] = CONVERT(
XML,
(
SELECT c.Text As [XML_Mode]
FOR XML PATH('')
)
)

,[Creation Date] = o.Create_Date
,[Last Modification Date] = o.Modify_Date

FROM Sys.Objects o
JOIN SysComments c
ON o.object_id = c.id
WHERE o.[Type] IN ('FN','TF','P')
ORDER BY o.[Type]

Comments or Responses

Login to post response