Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

trigger question

Status
Not open for further replies.

vindi

Programmer
Dec 2, 2002
10
US
Hi all,

Can i insert into a table from a view by using a trigger on the view. I have 3 tables which I join to create a view. Now i want to create one more table which has all the view columns and one additional new column. I was wondering if i can use an instead of trigger which will insert the contents from the view into the new table whenever any of the base tables are updated.
How do you do this? Thanks in advance.
 
You can create triggers on a view, however I beleive that to do what you are looking to do, you will need to create triggers on your base tables, which with then insert or update the new table as needed.

You might want to look at adding the new column to an existing table, or if the new column can be generated, add it to your view defination.

Denny
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top