Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Left join
Message
De
26/06/2002 06:58:17
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Left join
Divers
Thread ID:
00672381
Message ID:
00672381
Vues:
43
Hello ,
I would like to have a cursor as result with for each minute of the day a registration value if there is no registration for that period then I will change to .null. value to 0.

ltend=datetime()
ltstart=ltend-7200
*the seconds are changed to zero.

CREATE CURSOR curDates (dDatetime T)
do while ltstart<=ltend
INSERT INTO curdates (dDateTime) VALUES (ltstart)
ltstart=ltstart+60
enddo

SELECT * FROM registrations right JOIN curdates ON Registrations.datetime=curdates.dDatetime ;
ORDER BY curdates.dDateTime into cursor ctest

With this SQL-command I don't get a result the value-field is empty for all the dDatetime-records ??
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform