I have one temp table in which i need to insert record. the records has parent child relation. & when i insert parent its all child should be inserted into table. but if order of my records are like child1,child2,parent,child3,child4. then all child are moved properly but parent is not moved into table. so I wont get record of parent.
Joined: 23 Nov 2006 Posts: 15176 Location: 221 B Baker St
Hello,
What you describe is not a db2 problem. . . It is a design/coding problem.
Usually, when there is a parent/child relatoinship, the parent row must be inserted first, then the child row(ws). These are usually in separate tables when a parent may have multiple child entries.