Hi .
I am integrating a performance change that uses views to build a table ; The issue I am having is difficult to explain, but I will try my best .
1. My procedure builds 4 complex views :
create view_1 ;
create view_2 from view_1 < using more conditions > ;
create view_3 from view_2 < using more conditions >
create view_4 from view_3 <using more conditions >
INSERT INTO NEW_TABLE from view_4 ;
2. The procedure will fail to compile the 1st time it is ran with a obscure error with the INSERT :
ERROR : 942 : Table or view does not exit ;
3. NO VIEWS HAVE BEEN CREATED YET;
4. If I comment out the INSERT ; the procedure will compile and run to populate the four views.
5. Then if I un-comment on the INSERT statement ; the function will compile and successfully RUN the SECOND TIME populating NEW_TABLE ;
Can anyone explain this behavior ?