Richard Teasdale
asked on
SELECT SPECIFIC NUMBER OF RECORDS VFP
Hi:
A smallish question:
I have a table of planned production, one row for each date from today.
I want to extract (either as query or export) only the first 5 rows; being the next 5 working days.
Is there a facility to do this in vfp, please?
I was thinking about a loop that flagged the first 5 rows, then select those flagged- but is there another way?
Thanks!
A smallish question:
I have a table of planned production, one row for each date from today.
I want to extract (either as query or export) only the first 5 rows; being the next 5 working days.
Is there a facility to do this in vfp, please?
I was thinking about a loop that flagged the first 5 rows, then select those flagged- but is there another way?
Thanks!
ASKER
Thanks, CaptainCyril.
However we do not work at weekends, or bank holidays etc so selecting the next 5 days will, after tuesday, return saturday/sunday which are empty.
I am afraid my people need to see all 5 days, even allowing for gaps. Since the actual working dates are fixed as part of the originating database, then the first 5 rows will always be the next 5 days, if you get my drift!
Thanks again.
However we do not work at weekends, or bank holidays etc so selecting the next 5 days will, after tuesday, return saturday/sunday which are empty.
I am afraid my people need to see all 5 days, even allowing for gaps. Since the actual working dates are fixed as part of the originating database, then the first 5 rows will always be the next 5 days, if you get my drift!
Thanks again.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank You very much!
dToDate = DATE()+5
SELECT * FROM table WHERE date >= dFromDate and date <= dToDate