Sergey,
you hit the nail on the head. Our intention is to move our systems to a SQL database over the next few years. Both of our current systems are .DBF based with about 300 tables total between them. We don't have the resources to stop all work for many months and do a major convert. Instead, as we add new features or modify existing ones we convert the code to ANSI SQL as close as possible using a set of seperate data broker PRGs to read/write the data. Then, at some future point, the conversion should be a snap. (He said smiling.)
>
>Hi John,
>
>As Rich pointed out, your original query didn't generate an error in VFP6 but it could produce incorrect result because
emplid was coming from the last phisical record in a group, not from the record with MAX(asgnhrs). By sticking to SET ENGINEBEHAVIOR 90 you get queries that work correctly and also more ANSI compliant. The second part would make your life easier if you ever decide to upgrade your application to SQL Server backend.
Beer is proof that God loves man, and wants him to be happy. - Benjamin Franklin
John J. Henn