Delete DTS Pacakges not used

  • I'd like to remove DTS Packages not used in over 1 year. I run the following query but only receive 3 results, and manually looking at the packages and their logs, I can see there are more.

    SELECT sysdtspackages.name, MAX(sysdtspackagelog.logdate) AS LogDate

    FROM sysdtspackages INNER JOIN

    sysdtspackagelog ON sysdtspackages.id = sysdtspackagelog.id

    GROUP BY sysdtspackages.name

    HAVING (MAX(sysdtspackagelog.logdate) < GETDATE() - 365)

    Any help appreciated!

    ¤ §unshine ¤

  • I get this error..

    Line 5: Incorrect syntax near ')'.

    ¤ §unshine ¤

  • I didn't receive any such error message when I ran this code on SQL 2000 box.

    Manu

  • my fault, i added an incorrect post about using dateadd function which i deleted. unfortunately sunshine has already tried it, hence spurious post about missing ')'

    please ignore that post.

    ---------------------------------------------------------------------

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply