Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 0E0FB632939 for ; Mon, 7 Jun 2010 13:23:26 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 15189-06 for ; Mon, 7 Jun 2010 16:23:18 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wy0-f174.google.com (mail-wy0-f174.google.com [74.125.82.174]) by mail.postgresql.org (Postfix) with ESMTP id 9F6A863273A for ; Mon, 7 Jun 2010 13:23:18 -0300 (ADT) Received: by wyi11 with SMTP id 11so2511300wyi.19 for ; Mon, 07 Jun 2010 09:23:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:from:date :message-id:subject:to:content-type; bh=Fh4NVpwetCBByheZZCt+8kT2qa3fi8L7nf2TOX6A9iU=; b=Iy2Rkvune2LYnrKVwz7CEx3qBeILr42DxuHHcHr4/dWBSg926AmbQaVcRAY8XoHBFM mybAlGfbYce+WVY0n2N0gNxlQKIBNBL9yCS6jFiGiRv2mYqfIbf37Vw+Vaek5/wWyfAY ED0H+yKCeMwU7xfjWy8X3MoozEGmWjHzGIIRM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:from:date:message-id:subject:to:content-type; b=mlu0SQD5YdSti85jVw/PlM1iVJYzIsBFD1sOGP0IthJE75Mi6Jtw9dNaKqBJ4Bkj3b i4/AD4s0N7Ea9ZufX2Ub9fTE4KopvnYeQGKgU4vYhjBe82prf14KQ0dNzUV9v0xa0lkZ fwy1WL0kP/9vLYsZOSDFsNOqNGU1jUr6g00jQ= Received: by 10.216.163.79 with SMTP id z57mr2492447wek.17.1275927795630; Mon, 07 Jun 2010 09:23:15 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.157.138 with HTTP; Mon, 7 Jun 2010 09:22:55 -0700 (PDT) From: reyman Date: Mon, 7 Jun 2010 18:22:55 +0200 Message-ID: Subject: Multiple subquery with insert into command ? To: pgsql-sql@postgresql.org Content-Type: multipart/alternative; boundary=00163642759d04b1b804887317b5 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.801 tagged_above=-5 required=5 tests=BAYES_50=0.8, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201006/27 X-Sequence-Number: 34218 --00163642759d04b1b804887317b5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello guys ! I have problem with my query, i want to use the multiple insert possibility of pgsql... INSERT INTO umzintersect (intersection,umz00_id,pop, comm_id, name_asci) (SELECT intersection(umz_project.the_geom, lau2.the_geom), umz_project.umz00_id, umz_project.pop, lau2.comm_id, lau2.name_asci FROM umz_project, lau2,big_umz WHERE umz_project.umz00_id =3D big_umz.umz00_id AND umz_project.the_geom &= & lau2.the_geom AND umz_project.umz00_id =3D 23), (SELECT intersection(umz_project.the_geom, lau2.the_geom), umz_project.umz00_id, umz_project.pop, lau2.comm_id, lau2.name_asci FROM umz_project, lau2,big_umz WHERE umz_project.umz00_id =3D big_umz.umz00_id AND umz_project.the_geom &= & lau2.the_geom AND umz_project.umz00_id =3D 58); I have this error code : ********** Erreur ********** ERREUR: erreur de syntaxe sur ou pr=E8s de =AB , =BB =C9tat SQL :42601 Caract=E8re : 353 I don't understand where is my error ... With only one select, the query run, but with two, i have this error.. Perhaps insert into with multiple subquery is impossible ? So, how can i do this query without loose the GREAT multi query possibility of postgresql ? Thanks a lot in advance :) Seb --00163642759d04b1b804887317b5 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello guys !
I have problem with my query, i want to use the multiple in= sert possibility of pgsql...

INSERT INTO umzintersect (intersection= ,umz00_id,pop, comm_id, name_asci)
(SELECT intersection(umz_project.the= _geom, lau2.the_geom), umz_project.umz00_id, umz_project.pop, lau2.comm_id,= lau2.name_asci
FROM umz_project, lau2,big_umz
WHERE umz_project.umz00_id =3D=A0 big_um= z.umz00_id AND umz_project.the_geom && lau2.the_geom AND umz_projec= t.umz00_id =3D 23),
(SELECT intersection(umz_project.the_geom, lau2.the_= geom), umz_project.umz00_id, umz_project.pop, lau2.comm_id, lau2.name_asci =
FROM umz_project, lau2,big_umz
WHERE umz_project.umz00_id =3D=A0 big_um= z.umz00_id AND umz_project.the_geom && lau2.the_geom AND umz_projec= t.umz00_id =3D 58);

I have this error code :
********** Erreur *= *********

ERREUR: erreur de syntaxe sur ou pr=E8s de =AB , =BB
=C9tat SQL :426= 01
Caract=E8re : 353


I don't understand where is my error= ...
With only one select, the query run, but with two, i have this err= or..

Perhaps insert into with multiple subquery is impossible ? So, how can = i do this query without loose the GREAT multi query possibility of postgres= ql ?

Thanks a lot in advance :)
Seb

--00163642759d04b1b804887317b5--