| inserting predecessor and succerror values [message #429972] |
Fri, 06 November 2009 10:37  |
nastyjillu Messages: 156 Registered: February 2009 |
Senior Member |
|
|
<< this is edited >>
i have a table called Act. another table called Act_rel
values in table Act are
Aid Aname
a1 T1
a2 T2
a3 T3
now Act_rel will have predecessor and successor values.
for a1, there is no predecessor but there are 2 successors called T2 and T3
for a2, there is one predecessor T1 and one successor T3
for a3, there is no successor but there are 2 predecessors T1 and T2.
given Act table values are just for an example. the table may grow to any size. depending on that we
should insert values into act_rel.
i tried cursors,inserts, updates. but could findout
values of Act_rel should be like this in this particular case:
Aid Predec Succsr
a1 T2
a1 T3
a2 T1 T2
a3 T1
a3 T2
thanks
jillu
[Updated on: Fri, 06 November 2009 10:48]
|
|
|
|
|
|
|