Thread: Access question
View Single Post
Old 06-06-2005, 10:51 PM
volcane volcane is offline
Join Date: Apr 2005
Posts: 12
volcane is on a distinguished road

Had give it a try but don't think it is possible unless you had fixed number of friend. Easy solution will be like hurricane suggest used programming to loop thru it.

If you are using PL/SQL (Oracle) then you can create a function which will return concatenated friends name as a string and used it in your query.

This SQL will return what you want but fixed friends
SELECT DISTINCT, f1.friend & ', ' & f2.friend AS friends
FROM tb t, tb f1, tb f2
name = AND tname =
AND f1.friend < f2.friend;

Reply With Quote