March 12, 2008 at 1:07 pm
Not that it isn't possible...but I just spoke with a co-worker whom is a very good resource for DB2 (previous job)
and he couldn't come up with an answer to your question...i.e. there weren't appropriate procedures to do what you requested in DB2...
March 12, 2008 at 2:08 pm
I did this differently for a table holding 1.26 billion records. Deleting these many records would take long time or may be it would have never got completed. As I have only 26 GB space left on that box.
Create two tables duplicatetable1 and duplicatetable2 and insert all records you want to keep into duplicatetable1 and insert all records you want to delete into duplicatetable2 and drop original table and rename duplicatetable1 as original table. Recreate all indexes on original table.
This method took me much, much lesser time than compared to the delete each records method.
SQL DBA.
March 13, 2008 at 4:10 am
Thanks for the brilliant ideas, But unfortunately I can not use this idea of creating a temporary table for deletion purpose.
Is there any other way whic can help me plzzzz?
Many Thanks
Monalisa
March 13, 2008 at 7:35 am
I'm thinking you'd get MUCH better answers on how to do something in DB2 on a DB2 forum. I know I only have the foggiest of what Db2 code looks like.
A google search on SET rowcount and DB2 yields something called FETCH FIRST xxx. Don't know it, don't know how to use, but it might be useful anyway....
----------------------------------------------------------------------------------
Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?
March 13, 2008 at 8:10 am
This is off topic but I just got to tell you Matt....
Your Sig made me laugh out loud!
Viewing 5 posts - 16 through 19 (of 19 total)
You must be logged in to reply to this topic. Login to reply