Identify Parent Child records using oracle SQL and avoid merge -
i have requirement find parent child accounts using sql query , avoid merge process if survivor child , loser parent. have records in table x in following format
survivor loser 400-giz-514 400-1729e3
table x temporary table , records in them stored in base tables in base table relationship between these 2 records is
row_id par_ou_id parent 400-1729e3 null child 400-giz-514 400-1729e3
please me query identify these type of records , flag them not picked nightly process merge.
should able remove records temp table using
delete tablex exists ( select 1 basetable basetable.row_id = tablex.survivor , basetable.par_ou_id = tablex.loser )
Comments
Post a Comment