Re: delete tables
From: Dinesh T.K (tkdinesh_at_nospam.mail.tkdinesh.com)
Date: 06/03/04
- Next message: Hari: "Re: Stopping DBCC SHRINKDATABASE"
- Previous message: ilddoo: "bulk load option native? or formatfile?"
- In reply to: Lud: "delete tables"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 3 Jun 2004 07:13:32 +0530
Lud,
The below query would give the creation date of the tables whose name starts
with RC
SELECT crdate
FROM sysobjects
WHERE type='U'
AND [name] LIKE 'RC%'
You can schedule a sql job which will find the old ones (use DATEDIFF) and
drop them.
-- Dinesh SQL Server MVP -- -- SQL Server FAQ at http://www.tkdinesh.com "Lud" <anonymous@discussions.microsoft.com> wrote in message news:9F3258D6-2B18-4899-B137-1D4E73C609BD@microsoft.com... > Iīm new with SQL. I have a CA product that creates every day 44 tables, aways with the same name (RCXXXXX). But this program donīt delete this tables after generate its. I need to delete this tables automatic whent they became 7 days old. Any one can help? > Thanks, > > Lud
- Next message: Hari: "Re: Stopping DBCC SHRINKDATABASE"
- Previous message: ilddoo: "bulk load option native? or formatfile?"
- In reply to: Lud: "delete tables"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|