I have an employee database that is replicated to several other servers. Currently, only the employee ID and name are being replicated. However, the need has arisen to have the last four digits of the SSN replicated as well. The source database contains the entire employee SSN, and I don't want to replicated the entire number.
How can I modify the publication to only replica开发者_如何学Pythonte the last four digits of the SSN?
Example: Source: 123-45-6789 (int) -> Destination: 6789 (char(4))
EDIT: It should be noted that I cannot modify the schema of the source database. Therefore, I cannot add columns to the source table.
EDIT: Based on additional information provided, I think your option will be to replicate the full column and modify the insert/update stored procedures (dbo.sp_MSins_YourTableName
, dbo.sp_MSupd_YourTableName
) on the subscriber(s) to take the substring.
精彩评论