Hello,
I have a strange problem with merge replication. Our database has a users
table and an Orders table. we are succesfully using suser_sname() as our
first clause on the users table. This by itself works fine and only that
users data are returned to the PDA. However, when the second clause is
added, this is a clause on orders table ie. active='YES' which returns the
active orders only, then SQL seems to return a union of these 2 clauses
rather than using them both at the same time.
Any ideas?
I've seen this before - the view that is created uses a union rather than an
extra AND clause in the select statement. I suppose a workaround would be to
use an indexed view and join the data yourself, or you could add each filter
to each table.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Paul,
Thanks for your prompt reply. I am hacking the view in question and things
seem to work. I would have thought that such view behaivour is rather
strange.
Let's hope Microsoft fix this bug/feature in the future so that it does not
require weird work arounds.
Many thanks
"Paul Ibison" wrote:
> I've seen this before - the view that is created uses a union rather than an
> extra AND clause in the select statement. I suppose a workaround would be to
> use an indexed view and join the data yourself, or you could add each filter
> to each table.
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
>
|||Thanks for the update. I'll take a look at SQL Server 2005 this weekend and
post back to see if the fix exists.
Cheers,
Paul Ibison
Wednesday, February 15, 2012
Dynamic and Join Filters with Multipple clauses
Labels:
clauses,
database,
dynamic,
filters,
merge,
microsoft,
multipple,
mysql,
oracle,
orders,
replication,
server,
sql,
strange,
succesfully,
suser_sname,
table,
userstable
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment