IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Delete more records from table


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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

Moderator Emeritus


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

PostPosted: Wed Jul 06, 2011 10:51 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts DELETE SPUFI DB2 1
No new posts Load new table with Old unload - DB2 DB2 6
No new posts DSNTIAUL driven delete IBM Tools 0
Search our Forums:

Back to Top