Hi Paul,
I forgot to mention that the rows in the files table correlate to
physical files. So what I wanted is to have some *physical* files
downloaded to the client's computer, all of the rows in the files table
(the client may have to see or use data about files that he didn't
download) and only the rows in the fileproperties table that are
related to the few rows in files table that are related to the physical
files the user downloaded.
I know I can join the tables - FileProperties and the table that
associates the fileid to the hostname - but when I also need to use
WHERE Hosts_Files.HostName = host_name(). I tried to do it but the
replication wizard doesn't let me.
If you could provide me with a script or an example solution (or is it
just a view that I have to write in order to combine JOIN and WHERE
filters?), I'll be grateful.
Thanks in advance,
Zzzbla
[quoted text, click to view] Paul Ibison wrote:
> You could join these tables in the merge publication. Filtering in
> this case is a bit tricky as it looks as though you want to change
the
> filter effectively dynamically. I'm assuming that there is a typo
> somewhere, as this doesn't seem to make logical sense: "I want to
> replicate the entire table Files, and only the rows from
> fileProperties that have to do with the files they downloaded to
their
> computer" - this would seem to imply all FileProperties. The way I
> read your requirements are that you want users to select certain
files
> and have just associated details downloaded? If this is the case,
you
> can have a further table which relates fileids to hostnames.
Selecting
> to download a file will cause an insert of a record in this new
table.
> All tables would be joined on fileid, and the dynamic filter would be
> solely to the new table.
>
> Paul Ibison SQL Server MVP,
www.replicationanswers.com > (recommended sql server 2000 replication book:
>
http://www.nwsu.com/0974973602p.html)