creating triggers?

2005-12-30 Thread Brittingham, John
I would like to create a trigger that either updates or inserts a row in my USERS_PER_HOUR table when an entry is made in the LOG table. The log table has LOG_DATE, LOG_TIME and a CUID columns that I would like to either create a new row if the LOG_DATE and LOG_TIME do not exist or update the num

Table Lock issue on insert

2005-12-30 Thread Brittingham, John
I am having trouble with table lock. The query is as follows: INSERT INTO USERS_PER_HOUR SELECT count( DISTINCT ( CUID ) ),`TV_LOG_DATE`,`TV_LOG_TIME`, INTERFACE_ID FROM `TV_LOG_ALL` group by 2,3; I keep getting this error: #1206 - The total number of locks exceeds the lock table size