Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Left join
Message
From
26/06/2002 06:58:17
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Left join
Miscellaneous
Thread ID:
00672381
Message ID:
00672381
Views:
42
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 ??
Next
Reply
Map
View

Click here to load this message in the networking platform