Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SELECT last month not found?
Message
De
13/12/2004 19:25:53
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
13/12/2004 18:48:04
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Divers
Thread ID:
00968941
Message ID:
00968954
Vues:
7
>A simple case: I have a table with two relevant fields, and (month is represented as YYYYMM). This table has history for each part, starting from the current month and going back to some date in the foggy past.
>
>For each partno, how do I determine the last for that part nothat is NOT found in the table?

If you have a table of relevant month-years, you might do a subquery, with NOT IN, and then get a maximum on that.

Another option would be to get the first month which IS included, and then use a UDF to calculate the month before that.
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
Répondre
Fil
Voir

Click here to load this message in the networking platform