473,396 Members | 1,784 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,396 software developers and data experts.

Left Join behaving like Inner Join - Access 97

Hi there.

I am having an intrigueing problem.

I have a query which left joins another query to itself twice. The
original query is derived from a linked table in SQLServer 2000.

When I run it on my pc It runs fine. However for other users in the
office, it behaves as an inner join. ie it only returns the records fo
which the join fields equal each other. This happens on every other pc
I log into.

I have a couple of pcs with Access 2000 installed on it. When I convert
the database and run it on those pcs I also have no problem.

Any advice much appreciated.

Nov 13 '05 #1
5 4010
Jason, this sounds fairly unusual.

First thing to check is whether the users who do have the problem are adding
criteria to the query. If you use criteria on the fields from the outer side
of the join, it will behave as an inner join because the nulls are
eliminated.

You say the problem does not occur on your computer, but it does no others.
You are therefore seeking to pin down what is different between the
computers that do show the problem consistently, and those that don't.
Presumably your machine has both Access 97 and 2000 on it. Is that the
difference between yours and the others? Is this query being executed in
code, or run from the query window? If code, which DAO library are you
referencing? (It should be 3.51, but you could (incorrectly) end up with 3.6
referenced if the database was converted back from a later version, and that
could be the difference.)

A2000 and later do use a different query engine (JET 4 verses JET 3.5 in
A97), so it could theoretically behave differently, but I have not seen
anything like what you describe.

There is a case where JET wrongly treats an outer join as an inner join. It
sounds quite different to your symptom, and is not version dependent AFAIK.
Details in:
Records missed by SELECT query
at:
http://allenbrowne.com/bug-10.html

Is there any chance that Access could misundertand the data types of the
join or criteria? Typically this can happen where literals or calculated
fields are involved, and JET 4 certainly does behave differently than JET
3.5 in this area. (It seems less capable of identifying the correct type
IME.) If that sounds like it could apply to you, see:
Calculated fields misinterpreted
at:
http://allenbrowne.com/ser-45.html

HTH

--
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.

<ja*********@minterellison.com> wrote in message
news:11*********************@g14g2000cwa.googlegro ups.com...

I have a query which left joins another query to itself twice. The
original query is derived from a linked table in SQLServer 2000.

When I run it on my pc It runs fine. However for other users in the
office, it behaves as an inner join. ie it only returns the records fo
which the join fields equal each other. This happens on every other pc
I log into.

I have a couple of pcs with Access 2000 installed on it. When I convert
the database and run it on those pcs I also have no problem.

Any advice much appreciated.

Nov 13 '05 #2
Thanks very much for the reply Allen.

Firstly, the users are not adding any criteria to the query at all.

My computer does not have Access 2000 on it. I have however run the
query on another computer with both 97 and 2000 installed and it works
fine in 2000 but doesnt work in 97.

The query is just being run from the query window, not in code.

Finally, I have no literals or calculated fields in the query.

This is something I have not noticed happen before and certainly in the
case of this database, it used to work fine. I have users who have run
reports based on this query and printed them out, so the hard copies
they have verify the fact that it once worked.

It is indeed very odd

Nov 13 '05 #3
Further to my problem, I did a test whereby I imported the table data
from SQL Server into Access and recreated my query using the imported
table rather than the linked table.

In this case the query works fine. This does not solve my problem
because the live data is in SQLServer, however does maybe help to
narrow where the issue lies.

What I am now puzzling over is what possible difference could there be
between my link to the SQLServer and others.

Also why this problem has not previously been an issue.

Nov 13 '05 #4
Wow. I found the answer. Its taken some time but the effort worth it.

http://support.microsoft.com/kb/q225422/

I have installed service pack 3 for Jet3.5 and it has resolved the
issue.

Our IT dept has recently rolled out a new SOE. My suspicion is that
they applied patches in the previous SOE (hence why this problem hadnt
surfaced before) but didnt apply it to the new image.

I shall have to see if they can push this service pack out firm wide.

Thanks for all the help

Nov 13 '05 #5
Good trouble-shooting, Jason.

And thanks for posting the solution, so others who are searching the
archives at groups.google.com can find the answer.

--
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.

<ja*********@minterellison.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
Wow. I found the answer. Its taken some time but the effort worth it.

http://support.microsoft.com/kb/q225422/

I have installed service pack 3 for Jet3.5 and it has resolved the
issue.

Our IT dept has recently rolled out a new SOE. My suspicion is that
they applied patches in the previous SOE (hence why this problem hadnt
surfaced before) but didnt apply it to the new image.

I shall have to see if they can push this service pack out firm wide.

Thanks for all the help

Nov 13 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Paul Bramscher | last post by:
Here's one for pathological SQL programmers. I've got a table of things called elements. They're components, sort of like amino acids, which come together to form complex web pages -- as nodes...
1
by: Bob Alston | last post by:
I am trying to use an access sql statement in a module that does a left outer join on one table - joined to a table that has a selection criteria. The result is an inner join. If I do this in...
2
by: Darryl Kerkeslager | last post by:
The following SQL does as I intend, but ... SELECT offender_id, off_name, inv_ppo_id, add_note, add_zip_id, it_name AS Purpose FROM (offender INNER JOIN (investigation INNER JOIN...
3
by: Doug | last post by:
Hi, I'm more familiar with MSSQL than Access syntax and have run into a problem with correctly putting ( )'s around the joins in a 3 table query. I want to INNER JOIN lenders and accounts and...
3
by: media.opslag | last post by:
Hi, How can i get this to work in access / jet sql ??? Someone?? SELECT tbl1., tbl2. FROM tbl1 left outer join tbl2 on
4
by: phytorion | last post by:
i'm working in access2003 trying to bring three large tables(sys_sysobjects, sys_syscolumns, and dbo_pskeydefn) into one table filtered on by fieldname of a fourth table(table_name_master) ...
4
by: polycom | last post by:
Assistance needed to optimize this query SELECT SD.content_id AS Id, SD.title AS Title, CT.name AS Contenttype, PV.content_id AS SponsorId, ...
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...
9
by: shapper | last post by:
Hello, I am used to SQL but I am starting to use LINQ. How can I create Left, Right and Inner joins in LINQ? How to distinguish the different joins? Here is a great SQL example:...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.