dbTalk Databases Forums  

Filter via header/detail relationship?

microsoft.public.sqlserver.replication microsoft.public.sqlserver.replication


Discuss Filter via header/detail relationship? in the microsoft.public.sqlserver.replication forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Hilary Cotter
 
Posts: n/a

Default Filter via header/detail relationship? - 07-15-2003 , 11:13 AM






you should set up the article defaults so that the include
DRI table default is set.
Quote:
-----Original Message-----
(Doing Merge replication, Subscriber pulls, SQL2000sp3a,
clients as slow as 33k dialup through Symantec VPN)

Let's say I set up an OrderHeader table with (in addition
to the replication column(s) OrderID and SalespersonID,
and another table called OrderDetail with OrderID,
ItemID, and Qty. So far, so good.

Next I set up a FK relationship such that
OrderDetail.OrderID must exist in OrderHeader.OrderID.
Simple enough.

Now let's say I publish the two tables for replication,
and I set up a dynamic filter on OrderHeader using
SUSER_SNAME() = OrderHeader.SalespersonID. I do not set
up any filters for OrderDetail, on the theory that the
relationship will take care of filtering.

Am I correct?

If not, is there a way to do something similar, ie filter
a single top-level table rather than setting individual
filters for sub tables whose very data by nature is
limited by the FK relationship?

.


Reply With Quote
  #2  
Old   
Tom Jackson
 
Posts: n/a

Default Filter via header/detail relationship? - 07-15-2003 , 11:47 AM






Hillary Cotter wrote:
Quote:
-----Original Message-----
you should set up the article defaults so that the
include DRI table default is set.
Quote:
-----Original Message-----
Didn't understand your response, but am eager to do so
and very much appreciate it in any case. Can you be more
verbose and not use abbreviations?

(I'm a developer, but a SQL replication noob.)


Reply With Quote
  #3  
Old   
Hilary Cotter
 
Posts: n/a

Default Filter via header/detail relationship? - 07-15-2003 , 02:28 PM



when you are creating your publication you get to a dialog
called specify articles. Click on the article defaults.
Select table articles (you might not see this option) Then
go to the snapshot tab. In the Copy Objects to the
destination check include DRI.

Continue as per normal.
Quote:
-----Original Message-----
Hillary Cotter wrote:
-----Original Message-----
you should set up the article defaults so that the
include DRI table default is set.
-----Original Message-----

Didn't understand your response, but am eager to do so
and very much appreciate it in any case. Can you be more
verbose and not use abbreviations?

(I'm a developer, but a SQL replication noob.)
.


Reply With Quote
  #4  
Old   
Hilary Cotter
 
Posts: n/a

Default Re: Filter via header/detail relationship? - 07-15-2003 , 08:01 PM



Yes it does!
"Tom Jackson" <tomja (AT) bryanequipment (DOT) com> wrote

Quote:
Hillary Cotter wrote:
-----Original Message-----
when you are creating your publication you get to a
dialog called specify articles. Click on the article
defaults. Select table articles (you might not see this
option) Then go to the snapshot tab. In the Copy Objects
to the destination check include DRI.
-----Original Message-----

Got it, see it, did it. Cool :-)

DRI = Database referential integrity?



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.