Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need SQL help for date/time record selection
Message
From
20/07/1998 10:19:33
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Need SQL help for date/time record selection
Miscellaneous
Thread ID:
00119249
Message ID:
00119249
Views:
70
I need to be able to select records from a table based on a date/time range. The date & time are separate fields in the table with the date defined as an 8 position date field & the time as an 8 position character field. I need the record selection to be a single SQL command because I am retrieving the records into Lotus Notes via ODBC. The following command does not work, but I believe the logic is correct for what I am wanting:

SELECT * FROM APDIST03;
WHERE GLFYEAR = FiscalYear AND DTSTAT = " " AND;
(ADDDATE = FromDate AND ADDTIME >= FromTime OR;
ADDDATE = ToDate AND ADDTIME <= ToTime OR;
ADDDATE >FromDate AND ADDDATE < ToDate)

TIA for any suggestions! :)
Next
Reply
Map
View

Click here to load this message in the networking platform