G_Floppy
10-26-2007, 01:24 PM
I have two tables...
"A" with just one column "name" and the following data:
Greg
Doug
Brian
"B" has four columns: p1, p2, s1, s2 as follows:
Greg Doug 10 20
Greg Brian 30 40
Doug Brian 50 100
In one query, I'd like to combine the two tables, grabbing A.name, (either B.s1 or B.s2 where A.name = B.p1 or B.p2) as s.
The result in this example should be a two column table like this:
Greg 10
Doug 20
Greg 30
Brian 40
Doug 50
Brian 100
Thanks in advance for any help.
"A" with just one column "name" and the following data:
Greg
Doug
Brian
"B" has four columns: p1, p2, s1, s2 as follows:
Greg Doug 10 20
Greg Brian 30 40
Doug Brian 50 100
In one query, I'd like to combine the two tables, grabbing A.name, (either B.s1 or B.s2 where A.name = B.p1 or B.p2) as s.
The result in this example should be a two column table like this:
Greg 10
Doug 20
Greg 30
Brian 40
Doug 50
Brian 100
Thanks in advance for any help.