1

So, I have a scenario where I have an article that I want to be filtered based on two other articles in the publication. If I were to write this as T-SQL, it'd be:

select t3.*
from t3
inner join t2
   on t3.t2_id = t2.t2_id
inner join t1
   on t3.t1_id = t1.t1_id

Looking at sp_addmergefilter, it accepts a parameter called @join_articlename which implies that you can only join to one table at a time. Is there a way to accomplish what I'm trying to do? Thanks in advance.

Ben Thul
  • 31,080
  • 4
  • 45
  • 68
  • This question may be better suited for stackoverflow. –  Oct 20 '11 at 17:10
  • You might be right. However, I'll note the from the BOL article on sp_addmergefilter: "Only members of the sysadmin fixed server role or db_owner fixed database role can execute sp_addmergefilter.". Seems like a sysadmin task to me. – Ben Thul Oct 20 '11 at 17:16
  • @BenThul A note saying you need dbo to execute a certain stored procedure does not a sysadmin question make. See http://msdn.microsoft.com/en-us/library/ms178584.aspx: `Only members of the sysadmin fixed server role or db_owner fixed database role can execute sp_addmergefilter.` That doesn't mean that you need a sysadmin to build your query, it means your database privileges need to be configured correctly for the procedure to run once you've built it. Please review the [faq] for guidelines on what's on topic here. – Shane Madden Oct 20 '11 at 18:40
  • Then vote to move it if you think it's off-topic for this site. – Ben Thul Oct 20 '11 at 18:59

0 Answers0