OK, given what I believe to be the way the data exists, here is a select statement that returns the data in the order you want:
Code:
select a.eid, a.entry, b.exit
from t1 as a, t2 as b
where a.eid = b.eid
and b.exit in
( select min(c.exit)
from t2 as c
where a.eid = c.eid
and c.exit > a.entry)
Try this out and see if it works. If it does, you can then turn it into the insert statement that you need. If not, then let me know what is wrong.