﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / Administering / SQL Server 2005  / Creating Trigger on View / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Sun, 19 May 2013 10:19:38 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Creating Trigger on View</title><link>http://www.sqlservercentral.com/Forums/Topic1403208-146-1.aspx</link><description>[quote][b]opc.three (1/6/2013)[/b][hr][quote][b]Bhuvnesh (1/6/2013)[/b][hr]certainly , we can have trigger (instead of) but i will suggest to set the trigger on table.[/quote]That likely will not help the situation. There is unique value added to the system when an instead trigger is placed on a view that joins multiple tables. Namely that we can support inserts into that view where before, without the instead trigger, we could not.From [u][url=http://msdn.microsoft.com/en-us/library/ms175521(v=sql.105).aspx]http://msdn.microsoft.com/en-us/library/ms175521(v=sql.105).aspx[/url][/u][quote]The primary advantage of INSTEAD OF triggers is that they enable views that would not be updatable to support updates. A view based on multiple base tables must use an INSTEAD OF trigger to support inserts, updates, and deletes that reference data in more than one table.[/quote][/quote] diamond studded link ..thanks :-)</description><pubDate>Sun, 06 Jan 2013 22:58:23 GMT</pubDate><dc:creator>Bhuvnesh</dc:creator></item><item><title>RE: Creating Trigger on View</title><link>http://www.sqlservercentral.com/Forums/Topic1403208-146-1.aspx</link><description>[quote][b]Bhuvnesh (1/6/2013)[/b][hr]certainly , we can have trigger (instead of) but i will suggest to set the trigger on table.[/quote]That likely will not help the situation. There is unique value added to the system when an instead trigger is placed on a view that joins multiple tables. Namely that we can support inserts into that view where before, without the instead trigger, we could not.From [u][url=http://msdn.microsoft.com/en-us/library/ms175521(v=sql.105).aspx]http://msdn.microsoft.com/en-us/library/ms175521(v=sql.105).aspx[/url][/u][quote]The primary advantage of INSTEAD OF triggers is that they enable views that would not be updatable to support updates. A view based on multiple base tables must use an INSTEAD OF trigger to support inserts, updates, and deletes that reference data in more than one table.[/quote]</description><pubDate>Sun, 06 Jan 2013 11:53:58 GMT</pubDate><dc:creator>opc.three</dc:creator></item><item><title>RE: Creating Trigger on View</title><link>http://www.sqlservercentral.com/Forums/Topic1403208-146-1.aspx</link><description>certainly , we can have trigger (instead of) but i will suggest to set the trigger on table.</description><pubDate>Sun, 06 Jan 2013 07:26:32 GMT</pubDate><dc:creator>Bhuvnesh</dc:creator></item><item><title>RE: Creating Trigger on View</title><link>http://www.sqlservercentral.com/Forums/Topic1403208-146-1.aspx</link><description>What exactly is your problem? According to [b]BOL [/b]"A view can be referenced only by an INSTEAD OF trigger." [url]http://msdn.microsoft.com/en-us/library/ms189799%28v=sql.90%29.aspx[/url]</description><pubDate>Sat, 05 Jan 2013 04:19:38 GMT</pubDate><dc:creator>e4d4</dc:creator></item><item><title>Creating Trigger on View</title><link>http://www.sqlservercentral.com/Forums/Topic1403208-146-1.aspx</link><description>Dear,I have a view that is comprised of multiple tables containing only today's data. I used only select statement in that view. Now I want to write a trigger on that view that when a new row is inserted, it will insert a row into another table.What can I do for that? Please suggest me in your earlier time.Regards,Akbar</description><pubDate>Sat, 05 Jan 2013 02:51:29 GMT</pubDate><dc:creator>shohelr2003</dc:creator></item></channel></rss>