Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SELECT last month not found?
Message
De
13/12/2004 20:55:49
 
 
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:
00968974
Vues:
7
Sergey --

I always start from the current month and look backward -- for right now, at least, I'm only looking back one year.

So, indeed, if 200412 were missing for a partno, I'd want to get 2004121 as my result for that partno.

>>First of all, I apologize for not previewing my original message, which is embarrassing. This is what I meant to say:
>>-------------------
>>A simple case: I have a table with two relevant fields, {partno} and {month} (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 {month} for each part that is NOT found in the table?
>>-------------------
>>
>>If I have history for 200403, 200405, 200408, 200410, 200411, and 200412, for instance, I would be looking for 200409, which is the most recent month for which there is no data for this part.
>
>Jim,
>
>Couple more questions.
>- If, in your example data for 200412 wasn't present, would be 200409 what you're looking for or it would be 200412? IOW, is the last month that has to be present is based on fixed date (200412) or on the last record for particular partno.
>
>- How far back you want to look for missing month?
Jim Nelson
Newbury Park, CA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform