I have tables with following structure
TablePC
no, name, party19, party24
1, A, 1, 1
2, B, 1, 2
party19 and party24 columns are Foreign key constraint to TableParty.no
TableParty
no, name
1, X
2, Y
My query
select TablePC.name,TableParty.name as A,TableParty.name as B from TablePC join TableParty on TableParty.no=TablePC.party19 and TableParty.no=TablePC.party24
I require the output as
A, X, X
B, X, Y
I am not able to get this output. Any help is appreciated.
WR