pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gemeinschaft Studienarbeit Datenbanken <oodbms@floppy.org>
To: PostgreSQL SQL Mailing List <pgsql-sql@hub.org>
Subject: Another nut to crack with insertion into tables... *sigh*
Date: Sun, 27 Sep 1998 21:46:12 +0100
Message-ID: <199809272146.1239275.6@onyx> (raw)

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 ;-)







view thread (4+ messages)  latest in thread

Message-ID: <199809272146.1239275.6@onyx>
Permalink:  ../199809272146.1239275.6@onyx/
Also on:    postgresql.org/message-id/199809272146.1239275.6@onyx

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: oodbms@floppy.org, pgsql-sql@hub.org
  Subject: Re: Another nut to crack with insertion into tables... *sigh*
  In-Reply-To: <199809272146.1239275.6@onyx>
  References: <199809272146.1239275.6@onyx>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox