Outer Join SQL Server table with Access table, How ?

  • Thread starter Thread starter Bing
  • Start date Start date
B

Bing

I set up a linked server in SQL Server 2005, called Sysco.

I have a table call 'Sysco History'

To query access it, I can use
select *
from Syco...[Sysco History]

But, I can figurate how to do a join with a SQL Server table,
OriginalInvoices
from SQL Management Studio.

I try this,

select *
from OriginalInvoice
Right Outer join on OriginalInvoice.Invoice = Syco...[Sysco History].Invoice

but it does not work.

Thanks for your help.
 
Try:

select *
from OriginalInvoice
Right Outer join Syco...[Sysco History] on OriginalInvoice.Invoice =
Syco...[Sysco History].Invoice

Or with aliases:

select *
from OriginalInvoice as OI
Right Outer join Syco...[Sysco History] SH on OI.Invoice = SH.Invoice

--
Sylvain Lafontaine, ing.
MVP - Windows Live Platform
Email: sylvain2009 sylvainlafontaine com (fill the blanks, no spam please)
Independent consultant and remote programming for Access and SQL-Server
(French)
 
From personal experience, it's also a bad idea to use Right Outer Join
instead of Left Outer Join because they are much harder to read and
understand (follow) for the human mind.

--
Sylvain Lafontaine, ing.
MVP - Windows Live Platform
Email: sylvain2009 sylvainlafontaine com (fill the blanks, no spam please)
Independent consultant and remote programming for Access and SQL-Server
(French)
 
Back
Top