Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Rauken
Posting Yak Master
108 Posts |
Posted - 2007-02-02 : 05:30:42
|
Hi!I'm about to setup a merge replication Sql server 2005 and Sql server CE on pda's. There are 10 service guys in the field which need to sync their data with the server. I don't want each guy to have all the data from the db. What I found is that I can use SUSER_NAME() to filter data. However I haven't created unique db users on the server. I only have EmployeedId to identify the users. My question is, must I redesign my office application which feeds the sql server to suit SUSER_NAME() or do I have to create a publication for each user in the field?? |
|
MohammedU
Posting Yak Master
145 Posts |
Posted - 2007-02-06 : 01:43:36
|
You can filter the publication...select * from tablename where empid = (select * from emptable where empname = SUSER_NAME() )OR If you want to use hard coded empid in your filter you can do that...MohammedU |
|
|
Rauken
Posting Yak Master
108 Posts |
Posted - 2007-02-06 : 05:29:08
|
Thanks! That was what I was looking for. I expected that I needed to set up my own "translation" table for id -> suser_name(). |
|
|
|
|
|