Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Delete more records from table

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
callkris_cit

New User


Joined: 22 Apr 2006
Posts: 44

PostPosted: Wed Jul 06, 2011 10:05 pm    Post subject: Delete more records from table
Reply with quote

I have a CHILD table and PARENT table - Primary foreign key relationship

DELETE FROM CHILD_TABLE
WHERE EXISTS ( SELECT 1 FROM PARENT_TABLE B
WHERE A.COL_NAME = B.COL_NAME
AND B.TIMEVAL < CURRENT TIMESTAMP - 2 YEARS)

Both table contain more records. Plese let me know if i run this SPUFI via batch JCL, is it fine.

Or is there any issue, since i am deleting more records from the table using batch spufi. Or is there any other way i can do this,
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Jul 06, 2011 10:51 pm    Post subject:
Reply with quote

Hello,

Suggest you start over and explain what it is you actually want to do and what is your concern?

What is "more records"? If this is something "real" i probably would not use SPUFI.

Suggest you consider unloading the data and reloading the data that is to be kept.

If this is "real" some kind of audit trail should be kept. The "before" and the "after" data might suffice. . .
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Extract the records with a PD field's... sudhakar84 DFSORT/ICETOOL 11 Mon Apr 02, 2018 7:26 pm
No new posts Searching a table for the field name? socker_dad COBOL Programming 8 Sat Mar 31, 2018 2:57 am
No new posts Merge 2 records sancraig16 SYNCSORT 19 Tue Mar 27, 2018 8:17 pm
No new posts Need inputs on DB2 tablespace/table r... ashek15 DB2 3 Sat Mar 24, 2018 11:49 pm
No new posts Copy set of records based on condition krish.deepu SYNCSORT 2 Thu Mar 08, 2018 11:39 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us