replication stored procedure. This is what your custom delete proc would
"Sherpa" <NoSpam@Nospam.com> wrote in message
news:OjHY3i8pEHA.3592@TK2MSFTNGP09.phx.gbl...
> you missunderstood perhaps I should have explained better.
>
> On my publisher I want 3 months,
> My subscriber I would like 3 years.
>
> any ideas?
>
>
>
> ""Mingqing Cheng [MSFT]"" <v-mingqc@online.microsoft.com> wrote in message
> news:xg6yvW3pEHA.3356@cpmsftngxa06.phx.gbl...
> > Hi Sherpa,
> >
> > From your descriptions, I understood that you would like to filter the
> data
> > within three months. Have I understood you? Correct me if I was wrong.
> >
> > Based on my scope, your table must have an column to specify the
datetime
> > like this
> >
> > CREATE TABLE [dbo].[Table1] (
> > [c1] [char] (10) NULL ,
> > [d1] [datetime] NOT NULL ,
> > [c2] [char] (10) NULL
> > ) ON [PRIMARY]
> > GO
> >
> > Then, you could use Data Filter to define the data you want to
replicated
> > vertically and horizontally. Like the sampel below, you could noticed
that
> > where clause is defined in @filter_clause as d1< getdate() and d1
> > >dateadd(month, -3,getdate()).
> >
> > -- Adding the article's partition column(s)
> > exec sp_articlecolumn @publication = N'mingqing', @article = N'Table1',
> > @column = N'c1', @operation = N'add'
> > GO
> > exec sp_articlecolumn @publication = N'mingqing', @article = N'Table1',
> > @column = N'd1', @operation = N'add'
> > GO
> >
> > -- Adding the article filter
> > EXEC sp_articlefilter @publication = N'mingqing', @article = N'Table1',
> > @filter_name = N'dbo.FLTR_Table1_1__51', @filter_clause = N'd1<
getdate()
> > and d1 >dateadd(month, -3,getdate())'
> > GO
> >
> > In the dynamic filter, you can specify a function or a user-defined
> > function that is evaluated differently for each Subscriber based on the
> > connection properties of the Merge Agent when the merge process is
> > replicating data between the Subscriber and Publisher. Besides
> HOST_NAME(),
> > the system function SUSER_SNAME() can also be used for this purpose.
> >
> > You can also use a user-defined function in a dynamic filter, but unless
> > the user-defined function definition includes SUSER_SNAME(),
HOST_NAME(),
> > or the user-defined function evaluates one of these system functions in
> the
> > filter criteria (such as MyUDF(SUSER_SNAME()), the user-defined function
> > will be static.
> >
> >
> > Thank you for your patience and corperation. If you have any questions
or
> > concerns, don't hesitate to let me know. We are here to be of
assistance!
> >
> >
> > Sincerely yours,
> >
> > Mingqing Cheng
> >
> > Online Partner Support Specialist
> > Partner Support Group
> > Microsoft Global Technical Support Center
> > ---------------------------------------------------------------
> > Introduction to Yukon! -
http://www.microsoft.com/sql/yukon > > This posting is provided "as is" with no warranties and confers no
rights.
> > Please reply to newsgroups only, many thanks!
> >
> >
>
>