pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: alexj <alexj@freesurf.ch>
To: pgsql-sql@postgresql.org
Subject: trouble with query
Date: Tue, 18 Mar 2003 15:47:55 +0100
Message-ID: <3e7731a9$0$1051$5402220f@news.sunrise.ch> (raw)

Hi,

I'm looking how can I do to insert multiple values from a
complexe query.

What I want to do is something like that :

INSERT INTO est_planifie_jour (id,ref_activite,ref_ressource,ref_jour)
 (SELECT nextval('est_p_id_p') FROM est_planifie),
 (SELECT id_activite FROM activite WHERE
 nom = 'SGBD 02 cours théorique),
(SELECT ref_ressource FROM personne,groupe,fait_partie
 WHERE groupe.nom ='cycle 1b' AND
 fait_partie.ref_groupe = groupe.id_groupe AND
personne.id_personne = fait_partie.ref_personne),
(SELECT id_jour FROM jour WHERE jour.id_jour = 3)

Does anyone can advice me ?
--
/**
* Alexandre Jaquet
*/





view thread (2+ messages)  latest in thread

Message-ID: <3e7731a9$0$1051$5402220f@news.sunrise.ch>
Permalink:  ../3e7731a9$0$1051$5402220f@news.sunrise.ch/
Also on:    postgresql.org/message-id/3e7731a9$0$1051$5402220f@news.sunrise.ch

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: alexj@freesurf.ch
  Subject: Re: trouble with query
  In-Reply-To: <3e7731a9$0$1051$5402220f@news.sunrise.ch>

* 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