pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Carla Mello <carla.mello@widesoft.com.br>
To: Tomasz Myrta <jasiek@klaster.net>
Cc: Lista dyskusyjna pgsql-sql <pgsql-sql@postgresql.org>
Subject: Re: Executing dynamic queries (EXECUTE)
Date: Mon, 2 Feb 2004 08:37:03 -0200
Message-ID: <001501c3e978$7fbdd340$16011aac@widesoft.com.br> (raw)
References: <013d01c3e4e9$dbe16300$16011aac@widesoft.com.br>
	<401D56E6.7080700@klaster.net>

Hello Tomasz,

I´m going to study the FOR-IN-EXECUTE statement and to try again.

Thanks,
Carla Mello

----- Original Message -----
From: "Tomasz Myrta" <jasiek@klaster.net>
To: "Carla Mello" <carla.mello@widesoft.com.br>
Cc: "Lista dyskusyjna pgsql-sql" <pgsql-sql@postgresql.org>
Sent: Sunday, February 01, 2004 5:43 PM
Subject: Re: [SQL] Executing dynamic queries (EXECUTE)


> Dnia 2004-01-27 16:25, Użytkownik Carla Mello napisał:
> >
> >     Hello!
> >
> >     I need to execute a dynamic query and capture your result in a
> >     integer variable.
> >
> >     I´m using the statement "EXECUTE string", but I don´t obtain to
> >     capture the result of dynamic query.
> >           v_count:= EXECUTE v_query;
>
> Documentation:
> 19.5.4. Executing dynamic queries
>
> "The results from SELECT queries are discarded by EXECUTE, and SELECT
> INTO is not currently supported within EXECUTE. So, the only way to
> extract a result from a dynamically-created SELECT is to use the
> FOR-IN-EXECUTE form described later."
>
> Regards,
> Tomasz Myrta




view thread (3+ messages)

Message-ID: <001501c3e978$7fbdd340$16011aac@widesoft.com.br>
Permalink:  ../001501c3e978$7fbdd340$16011aac@widesoft.com.br/
Also on:    postgresql.org/message-id/001501c3e978$7fbdd340$16011aac@widesoft.com.br

 · 

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: carla.mello@widesoft.com.br, jasiek@klaster.net
  Subject: Re: Executing dynamic queries (EXECUTE)
  In-Reply-To: <001501c3e978$7fbdd340$16011aac@widesoft.com.br>

* 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