Elke Schmidtke wrote : > >Hi Elke, > >I receive the message during creation of the trigger. >The table does not exist in the moment of creation. > >The original code I want to use in the trigger is >TRY > DELETE FROM TEMP.ATZ_VIEW; >CATCH > CREATE TABLE TEMP.ATZ_VIEW (...); > >Procedures work perfect with code like this, but I'm not able >to create the trigger. > >The idea was to prevent table creation for every insert into the table. >Different users with different sessions can insert into the table. >I assume that all users would use the same temp table because >dba is creater (=owner) of the trigger. >Is it correct ? Or would every inserting user create it's own >temp table ? >But first of all, the trigger should be creatable. > >Thanks, Elke >
I think the problem with the TEMP table occurs, because you actually create 2 triggers, one for INSERT and the other for UPDATE sharing the same code. Internally the trigger code is compiled twice and the TEMP table already exists, when the update trigger becomes compiled. This is a bug. You can try to execute 2 create trigger statements to overcome this problem. The scope of a temporary table is the corresponding session, i.e. each user session firing the trigger will have its own temporary table. Best Regards, Thomas -- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]