Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL help
Message
From
16/04/2005 23:18:21
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
01005535
Message ID:
01005537
Views:
14
>VFP 9. Have a row of house sales with four columns. The fields are listed below. Sales year and month are character fields. I want all four columns returned for the most recent sale for each unique houseid.
>
>Table Fields
>houseid, sales month, sales year, sale amount,
>
>Thanks
>
>Brenda

Assuming the year and month are stored as digits in a character field, perhaps you can do something similar to:
select * from MyTable;
  where year + month in (select max(year + month) from MyTable)
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform