TSQL to get list of Stored Procedures created in last x days

Published 02 August 07 04:04 AM | SQL Master 
SELECT name
FROM sys.objects
WHERE type = 'P'
AND DATEDIFF(D,create_date, GETDATE()) > 7
Filed under: ,

Comments

# Madhivanan said on August 2, 2007 4:13 AM:

I think that should be

SELECT name

FROM sys.objects

WHERE type = 'P'

AND DATEDIFF(D,create_date, GETDATE()) < 7

to find procedures created for the last 7 days

# SQL Master said on August 2, 2007 5:52 AM:

You are right, its a typo.

thanks

# SSQA.net - SqlServer-QA.net said on August 3, 2007 3:32 AM:

SELECT name FROM sys.objects WHERE type = &#39;P&#39; AND DATEDIFF(D,create_date, GETDATE()) &gt; 7.

# Other SQL Server Blogs around the Web said on August 6, 2007 9:53 PM:

SELECT name FROM sys.objects WHERE type = &#39;P&#39; AND DATEDIFF(D,create_date, GETDATE()) &gt; 7.

Anonymous comments are disabled

About SQL Master

**__________________________________** SQL Server MVP, Sr. DBA & industry expert. - Knowledge is of two kinds. We know a subject ourselves or we know where we can find information on it. It is also a power and you will gain by sharing it.

Search

Go

This Blog

«August 2007»
SMTWTFS
2930311234
567891011
12131415161718
19202122232425
2627282930311
2345678

Syndication