I am looking to replicate the results of a query, is that possible or do I need to rep the tables themselves?
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
Yes its definately possible. We use it all the time for replicating warehouse data to 53 different warehouses. The query you are talking about is called a replication filter.
Now listen up!!! Do not put your query in the filter. Use a view instead.
That means you can easily alter the view at a later date as filters cannot be changed. So you filter will be "select cols from vwUserFilter"
If you put the query in the filter and want to change it, you'd have to drop the publication and re-create it which is very painful.
Also see this link
To replicate the results of a query, store the results in a table, and replicate that table. Yes the table must exist on the other servers. I suggest using snapshot replication for this type of scenario.