PC Review


Reply
Thread Tools Rate Thread

Full Outer Join Question

 
 
Barb Reinhardt
Guest
Posts: n/a
 
      6th May 2010
I'm trying to do a full outer join between the tables PS and Verification. I
want to join the fields titled "Non-Empl ID" in both tables. What syntax do
I need? I've tried several with no success. I want to retain the
non-matches between both tables as well.

Thanks

Barb Reinhardt

 
Reply With Quote
 
 
 
 
Barb Reinhardt
Guest
Posts: n/a
 
      6th May 2010
Thank you so much. Do I need the [ ] around column names that have spaces
in them (much like I need ' ' in Excel for worksheets with spaces) ?

Barb Reinhardt



"Marshall Barton" wrote:

> Barb Reinhardt wrote:
>
> >I'm trying to do a full outer join between the tables PS and Verification. I
> >want to join the fields titled "Non-Empl ID" in both tables. What syntax do
> >I need? I've tried several with no success. I want to retain the
> >non-matches between both tables as well.
> >

>
> SELECT PS.*, Verification.*
> FROM PS LEFT JOIN Verification
> ON PS.[Non-Empl ID] = Verification.[Non-Empl ID]
> UNION ALL
> SELECT PS.*, Verification.*
> FROM PS RIGHT JOIN Verification
> ON PS.[Non-Empl ID] = Verification.[Non-Empl ID]
> WHERE PS.[Non-Empl ID] Is Null
>
> --
> Marsh
> MVP [MS Access]
> .
>

 
Reply With Quote
 
 
 
 
John Spencer
Guest
Posts: n/a
 
      6th May 2010
Yes you need the square brackets for any field or table names that have any
characters in the names other than Letters, Numbers (with a least a leading
letter), and the underscore.

John Spencer
Access MVP 2002-2005, 2007-2010
The Hilltop Institute
University of Maryland Baltimore County

Barb Reinhardt wrote:
> Thank you so much. Do I need the [ ] around column names that have spaces
> in them (much like I need ' ' in Excel for worksheets with spaces) ?
>
> Barb Reinhardt
>
>
>
> "Marshall Barton" wrote:
>
>> Barb Reinhardt wrote:
>>
>>> I'm trying to do a full outer join between the tables PS and Verification. I
>>> want to join the fields titled "Non-Empl ID" in both tables. What syntax do
>>> I need? I've tried several with no success. I want to retain the
>>> non-matches between both tables as well.
>>>

>> SELECT PS.*, Verification.*
>> FROM PS LEFT JOIN Verification
>> ON PS.[Non-Empl ID] = Verification.[Non-Empl ID]
>> UNION ALL
>> SELECT PS.*, Verification.*
>> FROM PS RIGHT JOIN Verification
>> ON PS.[Non-Empl ID] = Verification.[Non-Empl ID]
>> WHERE PS.[Non-Empl ID] Is Null
>>
>> --
>> Marsh
>> MVP [MS Access]
>> .
>>

 
Reply With Quote
 
Petr Danes
Guest
Posts: n/a
 
      6th May 2010
You may need brackets if you have foreign characters in your field names and
you definitely need them if you have spaces, which is why many people
recommend that such names not be used. If your names are well-behaved, from
only the US alphabet, you do not need brackets.

Pete



"Barb Reinhardt" <(E-Mail Removed)> pÃ*Å¡e v diskusnÃ*m
pÅ™Ã*spÄ›vku news:28A620E5-5CBC-407D-A092-(E-Mail Removed)...
> Thank you so much. Do I need the [ ] around column names that have
> spaces
> in them (much like I need ' ' in Excel for worksheets with spaces) ?
>
> Barb Reinhardt
>
>
>
> "Marshall Barton" wrote:
>
>> Barb Reinhardt wrote:
>>
>> >I'm trying to do a full outer join between the tables PS and
>> >Verification. I
>> >want to join the fields titled "Non-Empl ID" in both tables. What
>> >syntax do
>> >I need? I've tried several with no success. I want to retain the
>> >non-matches between both tables as well.
>> >

>>
>> SELECT PS.*, Verification.*
>> FROM PS LEFT JOIN Verification
>> ON PS.[Non-Empl ID] = Verification.[Non-Empl ID]
>> UNION ALL
>> SELECT PS.*, Verification.*
>> FROM PS RIGHT JOIN Verification
>> ON PS.[Non-Empl ID] = Verification.[Non-Empl ID]
>> WHERE PS.[Non-Empl ID] Is Null
>>
>> --
>> Marsh
>> MVP [MS Access]
>> .
>>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LINQ: Inner Join & Left Outer Join Q Registered User Microsoft Dot NET 0 30th Aug 2009 05:41 AM
To give inner join and Left outer Join pol Microsoft Access 3 25th Feb 2009 09:05 AM
Outer Join Question - "join expression not supported" Raven Microsoft Access Queries 1 8th Jul 2008 03:15 PM
Access: problem with outer join - "Join Expression not Supported" Axel Microsoft Access Queries 1 8th Jul 2008 02:04 PM
Inner join or Outer Join =?Utf-8?B?QkFSUklPU1dK?= Microsoft Access Queries 7 21st Jul 2006 07:52 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:54 PM.