Lee,

I think the reason no one has answered is because it would be either a VERY complicated piece of SQL or a reasonably complex peice of PL/SQL.

Do you know PL/SQL, if so I can give you pointers as to what you will need to do.

Mike