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

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -