special join query

G

Guest

i have two tables([LIVE], [TEST]) each table contains two fields (mnemonic,
barcodes)

the mnemonics in each table match, but the LIVE table may have more barcodes
than in TEST.

the joined field would be mnemonics
how do i query the results that display the barcodes that are in LIVE but
not TEST ?
 
M

Marshall Barton

samuel said:
i have two tables([LIVE], [TEST]) each table contains two fields (mnemonic,
barcodes)

the mnemonics in each table match, but the LIVE table may have more barcodes
than in TEST.

the joined field would be mnemonics
how do i query the results that display the barcodes that are in LIVE but
not TEST ?


SELECT Live.*
FROM Live LEFT JOIN Test
ON Live.barcodes = Test.barcodes
WHERE Test.barcodes Is Null
 
G

Guest

what if both tables contain barcodes, but the barcodes are different for the
same mnemonic ?

Marshall Barton said:
samuel said:
i have two tables([LIVE], [TEST]) each table contains two fields (mnemonic,
barcodes)

the mnemonics in each table match, but the LIVE table may have more barcodes
than in TEST.

the joined field would be mnemonics
how do i query the results that display the barcodes that are in LIVE but
not TEST ?


SELECT Live.*
FROM Live LEFT JOIN Test
ON Live.barcodes = Test.barcodes
WHERE Test.barcodes Is Null
 
M

Marshall Barton

I guess I'm not sure what you want. Maybe this is it?

SELECT Live.*
FROM Live LEFT JOIN Test
ON Live.barcodes = Test.barcodes
AND Live.mnemonic = Test.mnemonic
WHERE Test.barcodes Is Null
--
Marsh
MVP [MS Access]

what if both tables contain barcodes, but the barcodes are different for the
same mnemonic ?

samuel said:
i have two tables([LIVE], [TEST]) each table contains two fields (mnemonic,
barcodes)

the mnemonics in each table match, but the LIVE table may have more barcodes
than in TEST.

the joined field would be mnemonics
how do i query the results that display the barcodes that are in LIVE but
not TEST ?
Marshall Barton said:
SELECT Live.*
FROM Live LEFT JOIN Test
ON Live.barcodes = Test.barcodes
WHERE Test.barcodes Is Null
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top