April 4, 2006 at 12:21 am
I can't find the answer in BOL but I am trying to use a linked server to access a sql server database at a remote site and when I use a subquery in the query i get no data returned but its fine if i do not use a subquery. I am trying access an msde instance from sql server 2005.
So my question is are subqueries not allowed in dirtributed transactions?
Thanks
David
April 4, 2006 at 8:25 am
Subqueries are fine within distributed transactions. Post your code, and let us look at what your doing.
April 4, 2006 at 12:59 pm
Thanks for the reply I thought they were but I don't use distributed transactions much.
Its just strange because the same query will run fine locally and if i take out the subquery it runs fine against the linked server and its a very basic subquery of the form its not correlated or anything.
select *
from table
where x >= (select sum(col)
from table)
anyway thanks for the reply
David
April 5, 2006 at 2:37 am
Could it be an easy oversight that you have no rows where 'x' is equal or bigger then the sum(col)?
April 5, 2006 at 1:20 pm
I was at the site today and ran the query on the actual box and it worked so am really not sure whats going on but heh life's no fun without a few puzzles to solve.
David
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply