Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > IBM DB2 > Re: Row and Sta...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 9 of 11 Topic 8868 of 9520
Post > Topic >>

Re: Row and Statement based Trigger Question

by "walker.l2" <walker.l2@[EMAIL PROTECTED] > May 12, 2008 at 02:20 AM

> Speed, mostly. This is a JDEdwards OneWorld site, so any batch work
> will be written in the OneWorld toolset, and will likely end up bing
> millions of individual inserts and deletes. The process would take
> many days for some of the files.
>
When all you have is a hammer, every problem lokos like a nail. :-)

This is an ideal job for a couple of simple SQL statements (that can
be run from a simple CL program if required).
Something like:
CREATE TABLE archive as SELECT * FROM mainfile WHERE date < sometime
WITH DATA
and
DELETE FROM mainfile WHERE date < sometime
should do the trick (N.B. I haven't checked the syntax of these, but
you get the idea), with an index over the 'date' field for performance
reasons.
In future a simple CPYF *ADD command with a date selection could move
records from mainfile to archive, and the SQL delete perform the tidy-
up.
 




 11 Posts in Topic:
Row and Statement based Trigger Question
JohnO <johno1234@[EMAI  2008-05-08 16:45:18 
Re: Row and Statement based Trigger Question
JohnO <johno1234@[EMAI  2008-05-08 16:49:31 
Re: Row and Statement based Trigger Question
Serge Rielau <srielau@  2008-05-08 21:04:49 
Re: Row and Statement based Trigger Question
JohnO <johno1234@[EMAI  2008-05-08 18:42:39 
Re: Row and Statement based Trigger Question
"walker.l2" <  2008-05-09 05:13:46 
Re: Row and Statement based Trigger Question
JohnO <johno1234@[EMAI  2008-05-10 15:51:59 
Re: Row and Statement based Trigger Question
Serge Rielau <srielau@  2008-05-10 22:36:42 
Re: Row and Statement based Trigger Question
JohnO <johno1234@[EMAI  2008-05-11 13:34:37 
Re: Row and Statement based Trigger Question
"walker.l2" <  2008-05-12 02:20:20 
Re: Row and Statement based Trigger Question
JohnO <johno1234@[EMAI  2008-05-12 18:33:43 
Re: Row and Statement based Trigger Question
"walker.l2" <  2008-05-14 01:47:01 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Dec 2 21:24:19 CST 2008.