Delete old data or junk data in the tables



IBM's flagship relational database management system

Delete old data or junk data in the tables

Postby rajkusar » Mon May 10, 2010 10:11 pm

Hi All,
We need to delete all the rows in a table that were inserted or updated in the table before a specified date or time-stamp. The table does not contain any column that reflects the insert or update time-stamp. Please let me know if we can do the same by using any method. Any help would be highly appreciated.

Regards,
Rajesh
rajkusar
 
Posts: 5
Joined: Mon May 10, 2010 9:26 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Delete old data or junk data in the tables

 

Re: Delete old data or junk data in the tables

Postby enrico-sorichetti » Mon May 10, 2010 10:38 pm

NO!

to delete something with a query You must define the logic behind

also You need to define junk data
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2643
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 130 times

Re: Delete old data or junk data in the tables

Postby dick scherrer » Mon May 10, 2010 11:50 pm

Hello,

If you want to delete based on date, there needs to be a date column. . .

Do all of the problem rows contain "junk" in one or more columns?

Just what is junk?

It may be more productive to unload the table, work with the unloaded data, and reload only what is worth keeping. . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6304
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 91 times


Return to DB2

 


  • Related topics
    Replies
    Views
    Last post