[sqlite] create trigger on view

2007-05-03 Thread noname

dear sir 

i have created view from five different table, view contains 20 records.
now when i want to retrieve the data from view like select * from vw. it
takes more time to retrieve the records. now i want to create table same as
view so that instead of retrieving the data from view i can get faster data
from table. i want to create trigger on view such a way that it creates same
copy from view as an when the record are inserted/updated/deleted in
original table. 

i tried but fails to generate table as views

Arvind parmar

-- 
View this message in context: 
http://www.nabble.com/create-trigger-on-view-tf3688489.html#a10311645
Sent from the SQLite mailing list archive at Nabble.com.


-
To unsubscribe, send email to [EMAIL PROTECTED]
-



Re: [sqlite] create trigger on view

2007-05-03 Thread Dennis Cote

noname wrote:

i have created view from five different table, view contains 20 records.
now when i want to retrieve the data from view like select * from vw. it
takes more time to retrieve the records. now i want to create table same as
view so that instead of retrieving the data from view i can get faster data
from table. i want to create trigger on view such a way that it creates same
copy from view as an when the record are inserted/updated/deleted in
original table. 


i tried but fails to generate table as views

  

Arvind,

You need to add triggers to the original tables that add or modify the 
required rows in your view cache table whenever a record is inserted or 
modified in the base tables. A trigger on the view will only fire when 
you access the view.


HTH
Dennis Cote

-
To unsubscribe, send email to [EMAIL PROTECTED]
-