Home   Home

The Journal of James Zealy

Needle in a haystack
09/10/2008 10:15 p.m.
What the dba gives

INSERT INTO CG.UNQ_CNST_KEY_EXPRTN
SELECT unq_enty_id FROM cg.unq_enty ue, (SELECT CNSTNT_IDV_KEY,unq_id_src_stm FROM CG.UNQ_ENTY
WHERE SRC_STM_ID=6 AND PRM_NM_IND='Y' and DM_EXPRTN_DT='9999-12-31'
GROUP BY CNSTNT_IDV_KEY,unq_id_src_stm HAVING COUNT(*)>1)V1
where ue.CNSTNT_IDV_KEY=v1.CNSTNT_IDV_KEY and ue.unq_id_src_stm=v1.unq_id_src_stm
and ue.SRC_STM_ID=6 AND ue.PRM_NM_IND='Y' and ue.DM_EXPRTN_DT='9999-12-31'
and ue.lst_mntn_dt='2008-08-31';

COMMIT;

He now takes away

delete from cg.unq_enty
where unq_enty_id in
(SELECT unq_enty_id FROM cg.unq_enty ue, (SELECT CNSTNT_IDV_KEY,unq_id_src_stm FROM CG.UNQ_ENTY
WHERE SRC_STM_ID=6 AND PRM_NM_IND='Y' and DM_EXPRTN_DT='9999-12-31'
GROUP BY CNSTNT_IDV_KEY,unq_id_src_stm HAVING COUNT(*)>1)V1
where ue.CNSTNT_IDV_KEY=v1.CNSTNT_IDV_KEY and ue.unq_id_src_stm=v1.unq_id_src_stm
and ue.SRC_STM_ID=6 AND ue.PRM_NM_IND='Y' and ue.DM_EXPRTN_DT='9999-12-31'
and ue.lst_mntn_dt='2008-08-31');
commit;
I am currently Better
I am listening to Keys click on the computer

Return to the Library of James Zealy

 

pathetic.org Version 7.3.2 May 2004 Terms and Conditions of Use 1 member(s) and 3 visitor(s) online
All works Copyright © 2026 their respective authors. Page Generated In 0 Second(s)