>On the money! And it ports fine to MSSQL also. Thanks.
Take a look at my other suggestion. Sometimes it could be much faster.
>One thing I am noticing as I try to make some SQL that works the same on VFP7 and MSSQL is that the MSSQL is much more limiting than VFP (ordering of statements, levels of recursion). Oh well, that's something else I won't mention to our MSSQL DBA... :)
It's not limiting it's just different. There's stuff you can do in Sql Server select you cannot even dream in VFP.
--sb--