DayPilot SQL Sample application
Hello,
In your sample there is this SQL string :
SELECT [id]....[allday] FROM [event] WHERE NOT ([eventstart]<=@start OR [eventend] >= (@end))
Is is better for performances to have a select from hours in a different field (date field and hour field) or a full date field ?
Also, why not use a 'WHERE >= <=' statement instead of WHERE NOT ?
Thanks
Asked by Anonymous 4 years ago.
But now I see that the original code is not quite right, it should read like this:
WHERE NOT (([eventend <= @start) OR ([eventstart] >= @end))
and the alternative should read like this:
WHERE ([eventstart] >= @start AND [eventstart] < @end) OR ([eventend] > @start AND [eventend] <= @end)
I'll fix it in the demo.
Answer posted by Dan Letecky 4 years ago.