May 3, 2005 at 4:25 am
Hello helpful chaps of ssc!
Im trying to use a linked server query as a subquery in an update statement and it doesn't like using aliases... so my query looks roughly like:
Update table x set a =
(select code from openquery(select b,c,code from table y)) as z
where z.b = x.b and
z.c = x.c
Any thoughts?
Thanks again!
Alex
May 3, 2005 at 6:26 am
Update x set x.a = Z.Code from TableX X inner join
(select code from openquery(select b,c,code from table y)) z
on z.b = x.b and
z.c = x.c
May 3, 2005 at 7:18 am
Well ,you lot have only gone and done it again!
Is this the most helpful forum ever?
Discuss
May 3, 2005 at 7:19 am
Yes it is .
May 5, 2005 at 10:02 am
>> The result of the update cannot be determined. The value of the column will depend upon either order of insertion, (if there are no clustered indexes present), or on order of clustering (but only if the cluster isn't fragmented). <<
Of Course if you FORCE to use a non-primary Key join you can't but
Have you compared the speed of the "Standard" Method against the "Proprietary" one when employed corretly, specially on LARGE Tables ?
* Noel
May 5, 2005 at 10:13 am
That's gonna be an interesting answer. Let me get some popcorn and coke before you answer that one .
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply