By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,841 Members | 1,736 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,841 IT Pros & Developers. It's quick & easy.

outer join

P: n/a
Hello,
How can I do outer join in ms-access database ?

Thanks :)
May 22 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
"Eitan M" <no_spam_please@nospam_please.com> skrev i en meddelelse news:e4**********@news2.netvision.net.il...
Hello,
How can I do outer join in ms-access database ?

Thanks :)


Outer join, is the same at Left Join & Right Join.
You have to use on of these.
May 22 '06 #2

P: n/a

SpookiePower wrote:
"Eitan M" <no_spam_please@nospam_please.com> skrev i en meddelelse news:e4**********@news2.netvision.net.il...
Hello,
How can I do outer join in ms-access database ?

Thanks :)


Outer join, is the same at Left Join & Right Join.
You have to use on of these.


LEFT JOIN and RIGHT JOIN are proprietary contractions of LEFT OUTER
JOIN and RIGHT OUTER JOIN from Standard SQL. There is also FULL OUTER
JOIN which Access/Jet does not support but can be mimicked with a LEFT
OUTER JOIN ...UNION...RIGHT OUTER JOIN.

Note Access/Jet does not fully support the ANSI join syntax and one
will commonly get the error 'Join expression not supported' e.g.

SELECT *
FROM Supplier
LEFT OUTER JOIN
SupParts
ON Supplier.supno = SupParts.supno
AND qty < 200;

which may not be the same as

SELECT *
FROM Supplier
LEFT OUTER JOIN
SupParts
ON Supplier.supno = SupParts.supno
WHERE qty < 200;

Again, one must work around this Jet limitation using a derived table.

Jamie.

--

May 22 '06 #3

P: n/a
Create a query that uses the tables you want to join.

If Access does not join the tables for you, in the upper pane of the query
design window, drag the field from one table onto the matching field in the
other table. Access will display the join as a line betweeen the 2 fields.

Double-click the line. You see a dialog with 3 options, representing the
INNER JOIN, LEFT JOIN, and RIGHT JOIN.

Or, if you are a SQL buff, you can switch the query to SQL View (View menu
in query design), and hammer away on the keyboard to your heart's content.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Eitan M" <no_spam_please@nospam_please.com> wrote in message
news:e4**********@news2.netvision.net.il...
How can I do outer join in ms-access database ?

May 22 '06 #4

P: n/a
Another whimsical way.

Link your local SQL-SERVER (SQLExpess?) to the Access DB. I find it's
better to do this outside Access and not to be saddled or addled with
whatever Access wants to add to the creation, such as Views to all the
Access DB's tables.

Create a new ADP connected to that Server with a new SQL DB, or just
use an existing one.

Create the SPROC in text eg:

ALTER PROCEDURE StoredProcedure1
AS
select p.productid, s.companyname from northwind...products p full
outer join northwind...suppliers s on p.supplierid = s.supplierid;

northwind is the name of the linked Access DB server.

While this many be unnecessary as there are ways to fudge the full
outer join in JET (as you have pointed out) one !!!SEEMS!!! to get the
full power of T_SQL and Access ADP for an MDB this way.

May 22 '06 #5

P: n/a
Lyle Fairfield wrote:
Another whimsical way.

Link your local SQL-SERVER (SQLExpess?) to the Access DB ... <<snipped>>


What do you mean by 'another' and who mentioned SQL Server <g>?

Jamie.

--

May 23 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.