We have merge replication setup between corporate database and remote clients. Lately we realized that people working on the corporate server do not need data to be tracked by merge replication as this data does not need to flow down to remote clients. We have decided to split tables between remote clients and people working on the corporate server.
Table1 has all data for remote clients as well as for people on corporate server. After table splitting, we want it to be
Table1 for remote clients and
Table2 for people on the corporate server.
To accomplish this I will have to change all my stored procedures for inserting and updating records in
table2. First I have to find records in
table1 and in case I don't find records in
table1, I have to search records in
table2 and then perform crud operations on the record.
Is there any easy way to accomplish this? A way where I don't have to change every stored procedure? I am aware of creating a view over
table2, then create an instead of insert trigger on the view and write logic in trigger to insert into
table2. Is anybody aware of any other way of accomplishing this kind of change?