You got it. Now your query is ANSI SQL compatible, so it could be run on SQL Server almost w/o modification. It's if you decide to move to SQL Server in the future. :)
>I would like to say thanks for this one. It was a challenge tonight to try to find the proper way to do it. Now that you have explained it, it makes sense and this is also faster as we don't have to carry all the fields on the main SQL, and once we get the keys, we just do another SQL for the INNER JOIN from the main tables to get the rest of the fields.
--sb--