Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: how do I purge data from a database table

Re: how do I purge data from a database table

From: Ed Stevens <spamdump_at_nospam.noway.nohow>
Date: Fri, 12 Apr 2002 12:41:28 GMT
Message-ID: <3cb6d454.327376943@ausnews.austin.ibm.com>


On Fri, 12 Apr 2002 10:48:37 GMT, willjamu_at_mindspring.com (James Williams) wrote:

>On 12 Apr 2002 03:15:01 -0700, ekearney_at_ddsi.ie (Edel) wrote:
>
>Describe you table and see if you have a column with date format.
>
>
>Then
>
>Delete from table where datecol < sysdate-180;
>

Shouldn't one be a bit more selective? Like perhaps a column with date format AND containing a date that would indicate how old the data is? Consider

EMPLOYEE_DATE_OF_BIRTH DATE I don't think the intent is to delete all employees who are more than six-months old.

BTW, our shop has a long-standing standard that ALL records (QSAM, ISAM, VSAM, IMS, DB2, Oracle) include 4 standard fields: Create_date, create_userid, mod_date, mod_userid.
>
>If not you will need to find a way to identify where criteria.
>
>>I need to purge data from a database table where the entries in the
>>table are more than 6 months old. I have no idea how to do
>>this...anybody know how this can be done?????
>
Received on Fri Apr 12 2002 - 07:41:28 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US