Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Microsoft Access > Re: Combining t...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 3 Topic 30169 of 30910
Post > Topic >>

Re: Combining two tables with no duplicate names

by Don Barton <DonaldB627@[EMAIL PROTECTED] > May 8, 2008 at 11:01 AM

Hi Marsh,
Thanks for the suggestion.
Bad news, good news:
Bad New:I tried the Union query, but still couldn't get it to work. .
Almost Good News: I next went in and checked both tables I wanted to
merge, and found that one of the tables had a duplicate name in it.
So I removed the duplicate, made a query that merged both tables (a
little different from the Union query, but did the same thing), and
the data looked great, BUT, when I attached query to a re****t, I was
still getting duplicates but only s****adically.
Good News: I had added a lookup table to the query that was suppose to
have unique locations, but there were some duplicates in the lookup
table, so this caused duplication in the re****t.  I removed the
duplicates, now all is good.
I would have used the Union query, but I was having to do so much
cleaning up of the data, that I used the "long" way.

Thanks again for your help,

Don

>
> Looks like you used a simple UNION query to do the merge.
>
> I think you might want a full outer join query something
> like:
>
> SELECT t1.Name, t1.NameID, t1.A, t1.B, t1.C, t2.D, t2.E
> FROM [Table 1] As t1 LEFT JOIN [Table 2] As t2
> =A0 =A0 =A0 =A0 ON t1.NameID =3D t2.NameID
> UNION ALL
> SELECT t2.Name, t2.NameID, Null, Null, Null, t2.D, t2.E
> FROM [Table 2] As t2 LEFT JOIN [Table 1] As t1
> =A0 =A0 =A0 =A0 ON t2.NameID =3D t1.NameID
> WHERE t1.NameID Is Null
>
> --
> Marsh- Hide quoted text -
>
> - Show quoted text -
 




 3 Posts in Topic:
Combining two tables with no duplicate names
Don Barton <DonaldB627  2008-05-05 11:59:28 
Re: Combining two tables with no duplicate names
Marshall Barton <marsh  2008-05-05 14:13:57 
Re: Combining two tables with no duplicate names
Don Barton <DonaldB627  2008-05-08 11:01:11 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Aug 21 20:46:57 CDT 2008.