Schedules

By scheduling activities you can ensure that a set of actions is executed at a set of preset times. The scheduling information and the event handler are both stored in the database itself.

See SQL Anywhere 11.0.1 > SQL Anywhere Server - Database Administration > Maintaining Your Database > Automating tasks using schedules and events > Understanding schedules.

Sybase IQ Example

Note:

For examples, use the Sybase IQ demo database iqdemo.db.

Create table OrderSummary(c1 date, c2 int);create event Summarizeschedulestart time '6:00 pm'on ('Mon', 'Tue', 'Wed', 'Thu', 'Fri')handlerbegin   insert into DBA.OrderSummary   select max(OrderDate), count(*)   from GROUPO.SalesOrders where OrderDate = current dateend