English 中文(简体)
SQL Server Replication, Consolidation
原标题:

How do I consolidate multiple publications into 1 consolidated table on the subscriber? For example. Consider a very simple sales model where we replicate sales data from the stores to the central office.

Store 1 Sales Table  
=====================  
Item     Qty      Amt  
=====================  
111       2     10.00  
222       1      7.00  
333       1     12.00  

Store 2 Sales Table
=====================
Item     Qty      Amt
=====================
111       2     18.00
222       1     13.00
333       1      4.00

How do I replicate these two sales publications from the publisher to ONE consolidated sales table at the subscriber:

Central Office
==============================
Store   Item     Qty       Amt
==============================
1        111       2     10.00
1        222       1      7.00
1        333       1     12.00
2        111       2     18.00
2        222       1     13.00
2        333       1      4.00
问题回答

Use "Keep the existing table unchanged", default is drop and recreate.

Fast search, old example but seems valid -> sql preformance





相关问题
Export tables from SQL Server to be imported to Oracle 10g

I m trying to export some tables from SQL Server 2005 and then create those tables and populate them in Oracle. I have about 10 tables, varying from 4 columns up to 25. I m not using any constraints/...

SQL server: Can NT accounts be mapped to SQL server accounts

In our database we have an SQL server account that has the correct roles to access some of the databases. We are now switching to windows authentication and I was wondering if we can create a NT user ...

SQL Server 2000, ADO 2.8, VB6

How to determine if a Transaction is active i.e. before issuing Begin Transaction I want to ensure that no previous transaction are open.. the platform is VB6, MS-SQL Server 2000 and ADO 2.8

热门标签