Received: from orion.SAPserv.Hamburg.dsh.de (Tpolaris2.sapham.debis.de [53.2.131.8]) by hub.org (8.9.3/8.9.3) with SMTP id MAA02323 for ; Fri, 10 Dec 1999 12:06:59 -0500 (EST) (envelope-from wieck@debis.com) Received: by orion.SAPserv.Hamburg.dsh.de for pgsql-sql@postgreSQL.org id m11wTMj-0003kGC; Fri, 10 Dec 99 17:57 MET Message-Id: From: wieck@debis.com (Jan Wieck) Subject: Re: [SQL] INSERT and SELECT To: eric@netsystems.fr (Eric BARROCA) Date: Fri, 10 Dec 1999 17:57:57 +0100 (MET) Cc: rison@biochemistry.ucl.ac.uk, pgsql-sql@postgreSQL.org Reply-To: wieck@debis.com (Jan Wieck) In-Reply-To: <87emcuu4f4.fsf@venus.fondation> from "Eric BARROCA" at Dec 10, 99 05:49:35 pm X-Mailer: ELM [version 2.4 PL25] Content-Type: text > > Stuart Rison writes: > > INSERT INTO table VALUES SELECT oid, 'test' FROM membre WHERE > > email=3D"toto@toto.com"; > I've tried it, but it doesn't work too ("paser error near or at select"), > even if I replace " by '. Because VALUES and SELECT are mutually exclusive at that point. Just do INSERT INTO table SELECT ... or INSERT INTO TABLE (attrib, ...) SELECT ... and the parser should be happy. Jan -- #======================================================================# # It's easier to get forgiveness for being wrong than for being right. # # Let's break this rule - forgive me. # #========================================= wieck@debis.com (Jan Wieck) #