• 0

SQL Help


Question

Using SQL server 2000 I have configured a database for merge replication with horizontal filtering

I need the data to be filtered by a host name which is specified on the subscriber side.

the host name relates to a column in one table

The database schema is for a 3rd party application and I am unable to add or alter tables

I have been able to get everything to work for the 'users'

with the following code

SELECT <published_columns> FROM [dbo].[tblContacts] 
WHERE (tblContacts.RepresentedRegion = host_name()

The problem I am running into is that I also have an account which is required to be able to see all data.

Does anybody know of a way that I can essentially disable filtering for this account, or is there some other method I can use to tell the filter to publish all data to the priviliged subscriber?

essentially my company wishes sales reps to be able to see contact information for only the region they are assigned, but sales managers to be able to see all contacts

thanks for the help!

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0
Using SQL server 2000 I have configured a database for merge replication with horizontal filtering

I need the data to be filtered by a host name which is specified on the subscriber side.

the host name relates to a column in one table

The database schema is for a 3rd party application and I am unable to add or alter tables

I have been able to get everything to work for the 'users'

with the following code

SELECT <published_columns> FROM [dbo].[tblContacts] 
WHERE (tblContacts.RepresentedRegion = host_name()

The problem I am running into is that I also have an  account which is required to be able to see all data. 

Does anybody know of a way that I can essentially disable filtering for this account, or is there some other method I can use to tell the filter to publish all data to the priviliged subscriber?

essentially my company wishes sales reps to be able to see contact information for only the region they are assigned, but sales managers to be able to see all contacts

thanks for the help!

584782689[/snapback]

How's your security done?

Link to comment
Share on other sites

  • 0

Solved it!

I used

SELECT <published_columns> FROM [dbo].[tblContacts]
WHERE (tblContacts.RepresentedRegion = host_name()) or (host_name() = 'admin')

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.