Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 8FA9D9FB340 for ; Tue, 26 Sep 2006 09:35:23 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 77981-05 for ; Tue, 26 Sep 2006 12:35:20 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.170]) by postgresql.org (Postfix) with ESMTP id 3CA799FB337 for ; Tue, 26 Sep 2006 09:35:20 -0300 (ADT) Received: by ug-out-1314.google.com with SMTP id 30so571559ugc for ; Tue, 26 Sep 2006 05:35:18 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=Vaudfm26kN5KN0HldqG+fmu9YZQih6pChTqx6leN9yGHQg4mYFMSBLTw+AJAqRVARU5gUP/z9v9koGO7V2Y6qUgVUy6+5UpahvhsULcuX2QyfubsEVmy/N3eBRzckot7qswM5Ys0SyYP2fl2BUwSN+5+cPA9GE5EBUiByVd8gZY= Received: by 10.66.224.3 with SMTP id w3mr632717ugg; Tue, 26 Sep 2006 05:35:18 -0700 (PDT) Received: by 10.67.118.11 with HTTP; Tue, 26 Sep 2006 05:35:18 -0700 (PDT) Message-ID: <55c095e90609260535r1951013ep15ec0d5a89c8a78a@mail.gmail.com> Date: Tue, 26 Sep 2006 09:35:18 -0300 From: "Ezequias Rodrigues da Rocha" To: pgsql-sql@postgresql.org Subject: Populating using Select MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_5465_28646415.1159274118422" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.574 tagged_above=0 required=5 tests=DNS_FROM_RFC_ABUSE, HTML_30_40, HTML_MESSAGE, SPF_PASS X-Spam-Level: X-Archive-Number: 200609/163 X-Sequence-Number: 26374 ------=_Part_5465_28646415.1159274118422 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi list, I need to populate a neigborhood table base on a select of another table that already have a good amount of neigborhood saved. Could someone tell me how it is possible ? I was trying to make something like this: Insert into base.neigborhood values (nextval(), Select distinct name from base.clients). I didn't try it but I suppose it will not work. Regards ... --=20 =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D= -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Atenciosamente (Sincerely) Ezequias Rodrigues da Rocha =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D= -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- A pior das democracias ainda =E9 melhor do que a melhor das ditaduras The worst of democracies is still better than the better of dictatorships http://ezequiasrocha.blogspot.com/ ------=_Part_5465_28646415.1159274118422 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi list,

I need to populate a neigborhood table base on a select of = another table that already have a good amount of neigborhood saved.

= Could someone tell me how it is possible ?

I was trying to make some= thing like this:

Insert into base.neigborhood values (nextval(), Select distinct nam= e from base.clients).

I didn't try it but I suppose it will not work= .


Regards ...

--
=3D-=3D-=3D-=3D-=3D-= =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D= -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-
            = ;            &n= bsp;         Atenciosamente (S= incerely)
          &n= bsp;            = ; Ezequias Rodrigues da Rocha
=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-= =3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D= -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-
A pior das democracias ainda =E9 melho= r do que a melhor das ditaduras
The worst of democracies is still better than the better of dictatorshi= ps
http://ezequiasrocha.= blogspot.com/ ------=_Part_5465_28646415.1159274118422--