How to create a view which is exposed to end users. User should be able to insert records into the view.

  • creating a view which is exposed to end users. User should be able to insert records into the view.

  • Hello,

    Please see the Books Online Topic "Modifying Data Through a View".

    Regards,

    John Marsh

    www.sql.lu
    SQL Server Luxembourg User Group

  • 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

  • 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