SQL to show Deposits by Client in Rita

SELECT BATCH_SEQ_NUM , CLIENT_ID ,sum(int( TRANS_AMOUNT )) FROM
ritadb30/request WHERE STATUS_CODE = 2 and CLIENT_ID = ‘100300001′
and command = ‘COMPLETION’ GROUP BY BATCH_SEQ_NUM, CLIENT_ID ORDER
BY BATCH_SEQ_NUM desc
Then subtract
SELECT BATCH_SEQ_NUM , CLIENT_ID ,sum(int( TRANS_AMOUNT )) FROM
ritadb30/request WHERE STATUS_CODE = 2 and CLIENT_ID = ‘100300001′
and command = ‘CREDIT‘ GROUP BY BATCH_SEQ_NUM, CLIENT_ID ORDER
BY BATCH_SEQ_NUM desc

Helpful SQL Commands for RiTA

Wipe out data in TEST environment

UPDATE RITADB30/REQUEST SET BATCH_SEQ_NUM = -10002, STATUS_CODE = 7
WHERE CLIENT_ID = ‘100010001′

Batch Sequence

select * from ritadb30/merch_term_btch where client_id = ‘100010001′

UPDATE RITADB30/MERCH_TERM_BTCH SET BATCH_SEQ_NUM = 20 WHERE
CLIENT_ID = ‘100010001′

How to compare files and create table of diff db2/sql

drop table mmason/yyckevents

CREATE TABLE MMASON/YYCKEVENTS like mmason/xxckevents        
Table YYCKEVENTS in MMASON created but could not be journaled.

(creates an empty table)
INSERT INTO MMASON/YYCKEVENTS SELECT * FROM mmason/mmckevents a    
WHERE not exists (SELECT 1 FROM mmason/xxckevents b WHERE a.EVEMPN 
= b.EVEMPN and a.EVSEQ = b. EVSEQ and a.EVTIME = b.evtime)         
1 rows inserted in YYCKEVENTS in MMASON.