Groups | Blog | Home
all groups > sql server replication > september 2005 >

sql server replication : Merge Replication Filtered Publication


Paul Ibison
9/20/2005 10:55:13 AM
Warren,
can you try adding the table tblKeyHolder to the publication and having an
explicit join?
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)

Warren Patterson
9/20/2005 11:10:58 AM
Hi People,

I need some help.

I am using SQL Server 2000 and have created a publication using Merge
Replication. One of the tables are filtered as follows:

SELECT <published_columns> FROM [dbo].[tblFingerPrint] WHERE
recordid in (select fingerprintid from tblKeyHolder)

The reason I do this is beacause I only want rows from fingerprint table to
be at the subscriber where the fingerprint ID is being used.

But for some reason it doesnt work, it will work when I reinitilize the
subscription, but not when I do a normal synch.


Can anyone help?

Thanks in advance
Warren

Warren Patterson
9/20/2005 12:08:21 PM
Thanks Paul I will give that a try.


[quoted text, click to view]

Warren Patterson
9/20/2005 12:41:32 PM
Hi,

I tried the following

SELECT <published_columns> FROM [dbo].[tblFingerPrint] INNER
JOIN [dbo].[tblKeyHolder] ON fingerprintid =
[dbo].[tblFingerPrint].recordid

and got this error:

Error 107: The column prefix 'dbo.tblFingerPrint' does not match with a
table name or alias name used in the query.
A column used in filter clause 'fingerprintid =
[dbo].[tblFingerPrint].recordid' either does not exist in the table
'tblKeyholder' or cannot be excluded from the current partition.

Any ideas?

[quoted text, click to view]

Paul Ibison
9/20/2005 12:48:18 PM
Hi Warren,
what I was thinking is to use the Filter Rows tab in the publication
properties and using the create join option. You can add 1=1 to the Filter
clause if this is not needed.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)



AddThis Social Bookmark Button