Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Gathering a set of records
Message
From
31/05/1999 21:35:18
 
 
To
31/05/1999 12:59:17
Randy Hooper
Ranco Business Software
Tampa, Florida, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00224673
Message ID:
00224784
Views:
20
>>>I would like to have a sql to gather a set of records based on a date field. For example I have several records in my table, say for the month of May I want to only select May 5th thru May 12th. If someone could show me example I would be very appreciative...
>>>
>>>Thanks Randy
>>
>>
>>SELECT Field1, Field2, Field3 ;
>> FROM MyTable ;
>> WHERE BETWEEN(DateField, {05/05/98}, {05/12/98}) ;
>> INTO CURSOR MyCursor
>
>Craig
>Why do I get ambiguous date/datetime constant error message and for this rountine I do not want to use the time and etc.

It has to do with your STRICT DATE setting. You can rewrite this as:

SELECT Field1, Field2, Field3 ;
FROM MyTable ;
WHERE BETWEEN(DateField, {^1998/05/05, 00:00}, {^1998/05/12, 23:59:59}) ;
INTO CURSOR MyCursor
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform