Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Converting to VFP9 SQL
Message
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01005624
Message ID:
01005635
Views:
13
>>You're mistaken that address for max(ordernum) was returned. The address was returned for the last physical record in the group which in your case happens to be record with max(ordernum). If for some reason pysical order of records didn't correspond to the ordernum you would get incorrect result. The following query with derived table should give you correct result.

>I made a very small table and tested it last night in VFP6. The address returned was always the address that corresponded to the MAX field. I entered the data in random order so that the MAX field was not the last physical record in the group.

I am mistaken. Just ran another test, as last night was very late and foggy, and it works just as you have stated. That is actually good. Because now I can change the VFP6 to VFP9 aggregate SQL knowing that the resulting fields that were not aggregates or not in the group by were random (not random, last physical record, but logically random).

Thanks

Brenda
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform