Question

I'm looking for a recent UDF, but can't remember the name of it, so if I could list them in order of when they were last modified that would help me find it.

Can this be done?

Was it helpful?

Solution

Yes, go to the View menu in Management Studio & select Object Explorer Details, then navigate to the UDF tree option you are interested in, i.e. Table-valued Functions.

The items under tha tree will appear in the Object Explorer Details panel, which you can order by Created Date.

OTHER TIPS

Are you looking for this,

SELECT NAME,TYPE_DESC,CREATE_DATE,MODIFY_DATE
FROM SYS.OBJECTS
WHERE 
DATEDIFF(D,MODIFY_DATE, GETDATE()) < 7
ORDER BY modify_date DESC

You can use INFORMATION_SCHEMA datatbase.

Select * from INFORMATION_SCHEMA.ROUTINES 
where ROUTINE_TYPE = 'FUNCTION' 
order by CREATED desc

Above one is order by created date, if you want to order by altered date than use below.

Select * from INFORMATION_SCHEMA.ROUTINES where 
ROUTINE_TYPE = 'FUNCTION' order by 
LAST_ALTERED desc
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top