help with query

T

todd

I have the following table:

Item Assembly Date
comp1 ass1 1/1/03
comp2 ass1 1/2/03
comp3 ass2 1/3/03
comp4 ass2 1/4/03
ass1 n/a 1/5/03
comp5 ass2 1/8/03
ass2 n/a 1/10/03

I want a query to return:

Item Assembly Assembly Date
comp1 ass1 1/5/03
comp2 ass1 1/5/03
comp3 ass2 1/10/03
comp4 ass2 1/10/03
comp5 ass2 1/10/03

So the query would find the assembly date for each
component by matching components with their assembly
numbers and assigning the component the assembly date as
the date of the assembly.

Can someone help?

Thanks.
 
M

Michel Walsh

Hi,



Bring the table twice, link Assembly to Item. The result should be like:

SELECT a.Item, a.Assembly, b.AssemblyDate
FROM myTable As a LEFT JOIN myTable As b
ON a.Assembly = b.Item



Hoping it may help,
Vanderghast, Access MVP
 

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