From: | Sferacarta Software <sferac(at)bo(dot)nettuno(dot)it> |
---|---|
To: | "PostgreSQL SQL Mailing List" <pgsql-sql(at)hub(dot)org>, "Gemeinschaft Studienarbeit Datenbanken" <oodbms(at)floppy(dot)org> |
Subject: | Re: [SQL] Another nut to crack with insertion into tables... *sigh* |
Date: | 1998-09-28 13:35:27 |
Message-ID: | 7649.980928@bo.nettuno.it |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Hello Gemeinschaft,
domenica, 27 settembre 98, you wrote:
GSD> insert into Rollenspiel
GSD> (Name, HerstellerID, Erscheinungsdatum,
GSD> Bestellnummer, Preisempfehlung,
GSD> Beschreibung,
GSD> Computertyp, Datentraegertyp,
GSD> System, AnzahlCharaktere, Typ,
GSD> Cluebook, SpielstandEditor)
GSD> values
GSD> ('Might & Magic I', (select HerstellerNummer from Hersteller
GSD> where Name like '%Blueborg%'), '17.03.1986',
GSD> 'role01', '29,50',
GSD> '{"Einfach irgendeine Beschreibung halt..."}',
GSD> '{"PC", "Mac", "c64", "Atari"}', '{"Diskette", "CD"}',
GSD> 'Freies System', 6, 'Fantasy',
GSD> '{"Solution to Might & Magic Series", "The Might & Magic I Solution"}',
GSD> '{"http://www.mightandmagic.de/I/editors.html"}');
GSD> ERROR: parser: parse error at or near "select"
GSD> The question is: why?
Actually, you can't assign the result of a subquery to a column,
This is a TODO item:
* Allow subqueries in target list
Jose'
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 1998-09-28 14:02:10 | Re: Another nut to crack with insertion into tables... *sigh* |
Previous Message | R.K.Street | 1998-09-28 09:48:14 | SQL type conversion - text to char/varchar |