Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL help
Message
De
16/04/2005 23:18:21
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
01005535
Message ID:
01005537
Vues:
13
>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)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform