can this be done in one SQL selcet statement?!

From: "sasan3(at)gmail(dot)com" <sasan3(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: can this be done in one SQL selcet statement?!
Date: 2006-12-07 02:22:54
Message-ID: 1165458174.185498.67020@80g2000cwy.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I have two table:
-Table1: one column of type TEXT containing label for nodes in a graph

-Table 2: two columns of type TEXT. first column contains node labels
in a graph. second a list of node labels that the node label in column
one is connected to.

Example:
Table1:
"NODE1"
"NODE2"

Table 2:
"NODE1" "NODE2 NODE3"
"NODE2" "NODE4 NODE3"

Goal:
split column2 in table2 to individual node names, find a unique
list of all node names obtained after splitting column2 of table2 and
insert the ones not already in table1 in table1.

Thanks in advance.

S

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron Johnson 2006-12-07 02:23:08 Re: Anything I can do to speed up this query?
Previous Message Jeff Davis 2006-12-07 02:22:32 Re: Online index builds