can this be done in one SQL selcet statement?! - Mailing list pgsql-general

From sasan3@gmail.com
Subject can this be done in one SQL selcet statement?!
Date
Msg-id 1165458174.185498.67020@80g2000cwy.googlegroups.com
Whole thread Raw
Responses Re: can this be done in one SQL selcet statement?!  (Greg Mitchell <gmitchell@atdesk.com>)
List 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


pgsql-general by date:

Previous
From: "stroncococcus"
Date:
Subject: Re: concatenation operator || with "null" array
Next
From: andy rost
Date:
Subject: SET statement_timeout