Thank you so much for the video. Its very helpful. I smashed the thumbs up for you. One thought regrading the last comparison is that it depends on the sourceKey. So if you have two data sets that does not have a sourceKey then using the last recommendation may not work since you have join on the sourceKey.
Hi BeardedDev, I do have a challenge that I am facing. Let say you are creating a view on top of multiple schemas dbo and dbo2, dbo2 has some auxiliary fields in new table, that in the future will become a single schema in dbo. How would you change data in that sort of view where insert is needed for both tables? Lets say I don't want to use triggers on the view and schema dbo cannot be changed. Will really be interested to know your answer. Thanks.
Think we should throw updating through a View out of the window for that scenario, this video was to show it can be done but it's very rare that it should be done. Creating the View on top of multiple tables is great but to run multiple inserts especially if the tables are related you need to use a stored procedure to control logic and add error handling.
Sure, so there isnt any real advantage in updating a view over a table, it's really designed for occasions where you don't want to give users access to the underlying tables but want to allow updates or perhaps the view is used to join many tables to resolve keys, you may prefer updating the view rather writing out an update statement based on those joins.
Thanks a million sir,
For all value adding contents and tutorials
Thanks so much.
Thank you so much for the video. Its very helpful. I smashed the thumbs up for you. One thought regrading the last comparison is that it depends on the sourceKey. So if you have two data sets that does not have a sourceKey then using the last recommendation may not work since you have join on the sourceKey.
Hi BeardedDev, I do have a challenge that I am facing. Let say you are creating a view on top of multiple schemas dbo and dbo2, dbo2 has some auxiliary fields in new table, that in the future will become a single schema in dbo. How would you change data in that sort of view where insert is needed for both tables? Lets say I don't want to use triggers on the view and schema dbo cannot be changed. Will really be interested to know your answer.
Thanks.
Think we should throw updating through a View out of the window for that scenario, this video was to show it can be done but it's very rare that it should be done. Creating the View on top of multiple tables is great but to run multiple inserts especially if the tables are related you need to use a stored procedure to control logic and add error handling.
i always thought Views were Read-Only.
what would be the advantage of updating view against updating a table directly ?
Could you answer ?
Sure, so there isnt any real advantage in updating a view over a table, it's really designed for occasions where you don't want to give users access to the underlying tables but want to allow updates or perhaps the view is used to join many tables to resolve keys, you may prefer updating the view rather writing out an update statement based on those joins.
Should rename it as 'with a View 'not 'in a view'.
That's a fair comment, my mistake.