Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SELECT last month not found?
Message
 
 
To
13/12/2004 19:40:41
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Miscellaneous
Thread ID:
00968941
Message ID:
00968963
Views:
8
>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?
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform