Chain/Thread Problem

From: sammynash(at)uboot(dot)com (Sammy)
To: pgsql-sql(at)postgresql(dot)org
Subject: Chain/Thread Problem
Date: 2003-05-16 14:46:43
Message-ID: 6729af8d.0305160646.d9ab2d2@posting.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi,

I have a SQL problem for you all. What SQL qurey would I have to make
on the following table to extract the chain (thread) of emails in a
conversation.

id|emailid|referenceid
-----------------------
1| e125 | Null (Start of chain)
2| r1fe | e125 (2nd letter in chain)
...
...
n| e4ju | r1fe (3rd in chain)

ie
a sucessulf qurey would return rows 1,2 & n because they are all in
the chain.

Hope you can help me with my problem,

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Achilleus Mantzios 2003-05-16 14:57:50 Re: Testing castability of text to numeric
Previous Message mdc 2003-05-16 14:02:40 installation problem