Hi JC,
I see two solutions to your problem:
1. Transfer local table to the linked server and then call a procedure on
this server that does what you need. In this case you need to transfer 500
records over the network and call 1 stored procedure - shouldn't be a
problem. You may need to define a linked server in the oposite direction for
the stored procedure.
2. Create a cursor for the local table in your local database, read userid
and for each of them run the insert statement with userid specified
explicitly.
Marek
Quote:> Im selecting from a table on a linked server but the
> query is very slow as the clause relies on data on my
> local server. In the local table there are about 500
> entries. in the table in the linled server there are
> several million.
> Im using something like this :
> insert into table
> select * from server.db.dbo.table where userid in (select
> userid from localtable)
> is there any more sfficient way of managing this ?
> JC