Jay,
You are welcome.
Like I said, I garantee my code in all versions of ASE up to 15.7, and I am pretty sure it will work on ASE 16.0 .
I believe Juerguen´s code is missing at least one join condition. If incorporate his query into mine, add the missing join and test I will revert.
Without a server to test on, a more difficult proposition. I will attempt the paper and pencil exercize, and let you know.
You will have to test and let us know if it works though!
LOL.
Jean-Pierre