sreekirt-1108866
SSC Journeyman
Points: 80
More actions
June 16, 2009 at 11:20 pm
#210739
creating a view which is exposed to end users. User should be able to insert records into the view.
John H Marsh
SSChampion
Points: 11671
June 16, 2009 at 11:41 pm
#1010643
Hello,
Please see the Books Online Topic "Modifying Data Through a View".
Regards,
John Marsh
www.sql.luSQL Server Luxembourg User Group
June 17, 2009 at 2:51 am
#1010701
I will elaborate on my post.
I have 2 tables tab1 and tab2.
There is a foreign key relation between two tables on the name column.
I need to create a view combining both the tables and then should be able to insert data into the view.
Please help me
MarkusB
SSC-Dedicated
Points: 37370
June 17, 2009 at 2:58 am
#1010705
In that case the PK from both tables should be part of the view.
For the inserts create an INSTEAD OF Trigger on the view.The trigger then should handle that the data columns get inserted into the correct table.
[font="Verdana"]Markus Bohse[/font]
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply