Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need SQL help for date/time record selection
Message
De
20/07/1998 10:19:33
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Need SQL help for date/time record selection
Divers
Thread ID:
00119249
Message ID:
00119249
Vues:
69
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! :)
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform