I have a table which holds contacts. these contacts are linked to each other useing a link table. for example:
-----------------------------------
Contacts Table:
recordid name
1 joe somebody
2 jane kane
-----------------------------------
link table:
recordid parentid linkedid
1 1 2
-----------------------------------
for every row in the link table I'd like to return a column
holding the parent name and a column holding the linked name.
Any ideas how I could do this with SQL.
-----------------------------------
Contacts Table:
recordid name
1 joe somebody
2 jane kane
-----------------------------------
link table:
recordid parentid linkedid
1 1 2
-----------------------------------
for every row in the link table I'd like to return a column
holding the parent name and a column holding the linked name.
Any ideas how I could do this with SQL.