Link to home
Start Free TrialLog in
Avatar of Richard Teasdale
Richard TeasdaleFlag for United Kingdom of Great Britain and Northern Ireland

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!
Avatar of Cyril Joudieh
Cyril Joudieh
Flag of Lebanon image

dFromDate = DATE()
dToDate = DATE()+5
SELECT * FROM table WHERE date >= dFromDate and date <= dToDate
Avatar of Richard Teasdale

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.
ASKER CERTIFIED SOLUTION
Avatar of Cyril Joudieh
Cyril Joudieh
Flag of Lebanon image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank You very much!