>Thank you very much. I tried it and it worked like a champ.
Very well
Sub queries can open you a lot of new doors. I have seen SQL commands to be up to 80 lines where I have a lot of them in it. The more you include in such a SQL, the better it would be if you adopt of standard in the way you write your SQL. Because, with such a number of lines in it, it could easily be difficult to understand if one would write it without applying a standard.
At first, I wasn't to sure about using that route. On this site for example, with the new migration to .NET, where the application is now Client Server all the way, I had to convert some fancy VFP SQLs that were spreaded on several SQLs into one SQL in .NET and I greatly welcomed the use of sub queries.