Another nut to crack with insertion into tables... *sigh* - Mailing list pgsql-sql

From Gemeinschaft Studienarbeit Datenbanken
Subject Another nut to crack with insertion into tables... *sigh*
Date
Msg-id 199809272146.1239275.6@onyx
Whole thread Raw
List pgsql-sql
insert into Rollenspiel
        (Name, HerstellerID, Erscheinungsdatum,
         Bestellnummer, Preisempfehlung,
         Beschreibung,
         Computertyp, Datentraegertyp,
         System, AnzahlCharaktere, Typ,
         Cluebook, SpielstandEditor)
        values
        ('Might & Magic I', (select HerstellerNummer from Hersteller
                where Name like '%Blueborg%'), '17.03.1986',
         'role01', '29,50',
         '{"Einfach irgendeine Beschreibung halt..."}',
         '{"PC", "Mac", "c64", "Atari"}', '{"Diskette", "CD"}',
         'Freies System', 6, 'Fantasy',
         '{"Solution to Might & Magic Series", "The Might & Magic I Solution"}',
         '{"http://www.mightandmagic.de/I/editors.html"}');
ERROR:  parser: parse error at or near "select"

The question is: why?

spiele=> select HerstellerNummer from Hersteller;
herstellernummer
----------------
               1
               2
              30
              31
              32
               4
               5
               6
               7
               8
              66
              70
              99
              17
              88
(15 rows)

Doing this from psql plainly yields the wanted result:

spiele=> select HerstellerNummer from Hersteller where Name like '%Blueborg%';
herstellernummer
----------------
               7
(1 row)

Pointers to FAQs, solutions, help, donuts greatly appreciated ;-)





pgsql-sql by date:

Previous
From: Herouth Maoz
Date:
Subject: Timespan conversion
Next
From: "Stan Thomas"
Date:
Subject: subscribe