Thank you June7 for the help.
Unfortunately, i don't have enough skills to perform this kind of work. I'm looking for having an integrated code that possibly does this sort of thing such that i can stick it in my database and proceed...
May you please have a look on the attached file. the data i have are stored in table14 will the output table that i expect is stuck in table18....is there a simple way to derive this output from the input data?
best
Jamal