Quantcast
Channel: StackExchange Replication Questions
Viewing all articles
Browse latest Browse all 17268

How do you create a custom replication between normalized and denormalized form using SQL Server

$
0
0

I have a table (on SQL Server 2008) that is denormalized like so:

Table: PhoneNumbers
Field: Partial varchar(8)   -- 123-1234
Field: [Data]               -- Refers to 800-123-1234 Data
Field: [888Data]            -- Refers to 888-123-1234 Data
etc

Table: OtherTables
Field: PhoneNumber varchar(10)   -- 8001231234

This design creates a nightmare in the code base and stored procedures when it comes to joins. The problem is that PhoneNumbers is tightly coupled to a large legacy Access database, so it cannot change.

I would like to create a replication of PhoneNumbers to a table like this:

Table: PhoneNumbersNormalized
Field: PhoneNumber varchar(10)    -- 8001231234
Field: [Data]

Any changes to PhoneNumbers should update PhoneNumbersNormalized and vice-versa. The goal being that users of the legacy Access database can continue working against the PhoneNumbers table, while services can work against PhoneNumbersNormalized


Viewing all articles
Browse latest Browse all 17268

Trending Articles