Another nut to crack with insertion into tables... *sigh*

Поиск
Список
Период
Сортировка
От Gemeinschaft Studienarbeit Datenbanken
Тема Another nut to crack with insertion into tables... *sigh*
Дата
Msg-id 199809272146.1239275.6@onyx
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: Herouth Maoz
Дата:
Сообщение: Timespan conversion
Следующее
От: "Stan Thomas"
Дата:
Сообщение: subscribe