?
Solved

Left outer join not supported in SQL statement

Posted on 2005-03-31
8
Medium Priority
?
6,452 Views
Last Modified: 2008-02-26
Access says "Join expression not supported":

SELECT Count(*)
FROM dbo.organiz a left outer join SIC_CODE c on
a.SIC_ID=c.SIC_ID AND a.SIC_GID=c.SIC_GID, PERSON b
WHERE a.CREATEPER = b.PERSON_ID AND
(a.CREATE_DAT Between #8/18/2004# And #10/17/2004#) AND
(a.SIC_ID Is Null OR c.SIC_ABRV='TBD') AND (a.MKT_SEG_ID<>8) AND (left(b.PER_INIT,LEN('LV'))='LV');

How can I modify this statement so Access can understand it?

Thanks!
0
Comment
Question by:psk1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +2
8 Comments
 
LVL 120

Assisted Solution

by:Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1) earned 1000 total points
ID: 13678079
try

SELECT Count(*)
FROM dbo.organiz a LEFT join SIC_CODE c on
a.SIC_ID=c.SIC_ID AND a.SIC_GID=c.SIC_GID, PERSON b
WHERE a.CREATEPER = b.PERSON_ID AND
(a.CREATE_DAT Between #8/18/2004# And #10/17/2004#) AND
(a.SIC_ID Is Null OR c.SIC_ABRV='TBD') AND (a.MKT_SEG_ID<>8) AND (left(b.PER_INIT,LEN('LV'))='LV');
0
 
LVL 2

Author Comment

by:psk1
ID: 13678112
Same thing happening here:

SELECT Count(organiz.org_id)
FROM organiz organiz left outer join orgperus orgperus
on organiz.ORG_ID=orgperus.ORG_ID, person person
WHERE organiz.MKT_SEG_ID<>8 and orgperus.org_id is null AND
(organiz.CREATE_DAT Between @BeginDate And @EndDate) AND
organiz.CREATEPER=person.person_id AND
left(person.per_init,LEN(@IDCode))=@IDCode;

What's up with this left outer join?
0
 
LVL 2

Author Comment

by:psk1
ID: 13678124
Capricorn,
That gave me the same result :(

It doesn't like the left join at all?  What should I be looking at to find the root of the problem?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 13678203
Can you try it first with a simple query.
create two tables A and B with two fields and try a query like this

SELECT A.ID, A.Amount
FROM A LEFT JOIN B ON A.ID = B.ID;
0
 
LVL 41

Accepted Solution

by:
shanesuebsahakarn earned 1000 total points
ID: 13678377
Try:

SELECT Count(*)
FROM (dbo.organiz a LEFT JOIN SIC_CODE c on
a.SIC_ID=c.SIC_ID AND a.SIC_GID=c.SIC_GID) INNER JOIN PERSON b
ON a.CREATEPER = b.PERSON_ID WHERE
(a.CREATE_DAT Between #8/18/2004# And #10/17/2004#) AND
(a.SIC_ID Is Null OR c.SIC_ABRV='TBD') AND (a.MKT_SEG_ID<>8) AND (left(b.PER_INIT,LEN('LV'))='LV');
0
 
LVL 3

Expert Comment

by:poaysee
ID: 13678486
Can you try to check on your data type and length which you join together?
0
 
LVL 11

Expert Comment

by:miqrogroove
ID: 13802634
Each one of the queries so far appears to have invalid syntax directly after the word FROM, unless this is something I'm not familiar with.  See:

FROM dbo.organiz a
FROM organiz organiz
FROM (dbo.organiz a

As far as I know, none of these are valid, and all would cause a join error.

Good luck,
-- Miqro
0
 
LVL 11

Expert Comment

by:miqrogroove
ID: 13807993
psk1,  if those queries are working for you, could you explain what 'dbo.organiz a' does?  I'm curious.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question