From: Tomasz Myrta <jasiek@klaster.net>
To: Carla Mello <carla.mello@widesoft.com.br>
Cc: Lista dyskusyjna pgsql-sql <pgsql-sql@postgresql.org>
Subject: Re: Executing dynamic queries (EXECUTE)
Date: Sun, 01 Feb 2004 20:43:34 +0100
Message-ID: <401D56E6.7080700@klaster.net> (raw)
In-Reply-To: <013d01c3e4e9$dbe16300$16011aac@widesoft.com.br>
References: <013d01c3e4e9$dbe16300$16011aac@widesoft.com.br>
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
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: jasiek@klaster.net, carla.mello@widesoft.com.br
Subject: Re: Executing dynamic queries (EXECUTE)
In-Reply-To: <401D56E6.7080700@klaster.net>
* 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