var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Help with linked server query...
I have the following query:
select col1, col2, col3 from [linked_server].db1.dbo.tbl1
where col1 not in (select col1 from tbl1)
I get the columns that I need from the linked server, but I am not sure how to add to the results col1 from the local sql server?
so the results I would get would be:
linked.col1, linked.col2, linked.col3, local.col1
Any help would be greatly appreciated!
Bearing in mind that I'm almost certain what you asked for is not what you really want, the solution would be:
SELECT r937.col1, r937.col2, r937.col3, PatP.col1
FROM [linked_server].db1.dbo.tbl1 AS r937
LEFT OUTER JOIN tbl1 AS PatP
ON (PatP.col1 = r937.col1)
WHERE PatP.col1 != r937.col1