Code: Select all
<XYZDetails> ...root
<ABC_Segment> ....parent segment
<AAA>11111</AAA>
<BBB>222</BBB>
<CCC>3333</CCC>
<GPP_Segment> ....child segment
<DDD>123<DDD>
<EEE>1122<EEE>
</GPP_Segment>
</ABC_Segment>
<ABC_Segment>
<AAA>11111</AAA>
<BBB>222</BBB>
<CCC>3333</CCC>
<GPP_Segment>
<DDD>777<DDD>
<EEE>0<EEE>
</GPP_Segment>
</ABC_Segment>
<ABC_Segment>
<AAA>9999</AAA>
<BBB>0</BBB>
<CCC>PPPP</CCC>
</ABC_Segment>
<XYZDetails>
You can see first 2 segment (ABC_Segment) repetitions are duplicate and I have to load the duplicates as as with keys.
So I loaded as:
Code: Select all
Lkp_Key Key_Value
11111|222|3333 1
11111|222|3333 2
9999|0|PPPP 3
So can anyone help me to how can I create a unique lookup key so as that I can tag the correct child to its respective parent.
I tried with concatenating a @INROWNUM at the end of key but I dont know how the child segment will be able to identify its correct parent.
Hope I am able to explain my question.
Ps : I am doing this on server job.