473,385 Members | 1,548 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

outer join

Hello,
How can I do outer join in ms-access database ?

Thanks :)
May 22 '06 #1
5 3262
"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

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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Martin | last post by:
I am now working on SQL Server 2000 having had previous experience on a different database. Both of the OUTER JOIN syntaxes is different from what I am used to and I am finding it slightly...
8
by: Matt | last post by:
Hello I have to tables ar and arb, ar holds articles and a swedish description, arb holds descriptions in other languages. I want to retreive all articles that match a criteria from ar and...
4
by: thilbert | last post by:
All, I have a perplexing problem that I hope someone can help me with. I have the following table struct: Permission ----------------- PermissionId Permission
3
by: Dam | last post by:
Using SqlServer : Query 1 : SELECT def.lID as IdDefinition, TDC_AUneValeur.VALEURDERETOUR as ValeurDeRetour FROM serveur.Data_tblDEFINITIONTABLEDECODES def,...
3
by: Martin | last post by:
Hello everybody, I have the following question. As a join clause on Oracle we use " table1.field1 = table2.field1 (+) " On SQL Server we use " table1.field1 *= table2.field1 " Does DB2...
3
by: deko | last post by:
From what I understand, an Inner Join narrow the rows selected to the table with the least results... and an Outer Join does the opposite... SELECT qryTxToQ1.Q1Total, qryTxToQ2.Q2Total,...
14
by: mike | last post by:
I'm using postgresl 7.3.2 and have a query that executes very slowly. There are 2 tables: Item and LogEvent. ItemID (an int4) is the primary key of Item, and is also a field in LogEvent. Some...
1
by: Andreas Bauer | last post by:
Hi, when I try a left outer join on one table everything works fine: select * from (tourist.users u left outer join tourist.user_extended_info ue on (u.id = ue.id)) But now I need to do...
1
by: teneesh | last post by:
Here I have a code for a view that has been created by a developer on my team. I am trying to use the very same code to create a view for a different formid/quesid. But I cannot figure out how this...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.