Subject Re: Complex Query For Schedule
Author Adam
Paul,

One Gotcha, change:

SCHEDSCALE INTEGER)

To:

SCHEDSCALE DOUBLE PRECISION)

Otherwise your counter variable TempTime will end up using integer
division, and will go into an infinite loop as 20/1440 will return 0.

> TempTime = TempTime + cast((SchedScale / (60 * 24)) as time);

Adam