I asked this question yesterday, but the answer didn't work for me PHV. I am getting extra rows(erraneous ones). Any other ideas? All of my ideas-and PHV's- seem to give me 50% extra rows.
I have two tables: A & B.
Table A:
ID(Primary Key) | Type
001 A
002 B
003 C
Table B:
ID(this contains duplicates) | Origin(not imptnt.)
001 ZZ
001 YY
001 XX
002 NN
I need to add on the type column onto table B (preferably just a query). For each ID in table B, I need to look up the ID in table A and return the corresponding type. Help is EXTrEMEly appriciated! What the output needs to look like is:
Needed Query Table:
ID | Origin | Type
001 ZZ A
001 YY A
001 XX A
002 NN B
***this gave me 50%extra rows****
PHV (MIS) 21 Jun 05 22:57
Have a look at JOINs and RelationShips:
SELECT B.ID, B.Origin, A.Type
FROM [Table B] B INNER JOIN [Table A] A ON B.ID = A.ID
I have two tables: A & B.
Table A:
ID(Primary Key) | Type
001 A
002 B
003 C
Table B:
ID(this contains duplicates) | Origin(not imptnt.)
001 ZZ
001 YY
001 XX
002 NN
I need to add on the type column onto table B (preferably just a query). For each ID in table B, I need to look up the ID in table A and return the corresponding type. Help is EXTrEMEly appriciated! What the output needs to look like is:
Needed Query Table:
ID | Origin | Type
001 ZZ A
001 YY A
001 XX A
002 NN B
***this gave me 50%extra rows****
PHV (MIS) 21 Jun 05 22:57
Have a look at JOINs and RelationShips:
SELECT B.ID, B.Origin, A.Type
FROM [Table B] B INNER JOIN [Table A] A ON B.ID = A.ID