how to sql query this?

From: steve <me_at_me.com>
Date: Sun, 17 Oct 2004 18:42:06 +0800
Message-ID: <0001HW.BD986D7E002C24CCF05095B0_at_news.newsguy.com>



Hi,

I have a table that contains data keys similar the following, where each letter is a key to an address

a,b
a,c
c,b
b,d
d,f
x,y
p,q

if i pass in a key such as "a" how can i return the items that are connected to "a" both directly & indirectly?

I.E

a,b
a,c
c,b ( via a,c)
b,d (via a,b)
d,f ( via a,b+b,d)

the parent key is always in col1, the child in col2

steve Received on Sun Oct 17 2004 - 12:42:06 CEST

Original text of this message