Re: Executing dynamic queries (EXECUTE)

From: "Carla Mello" <carla(dot)mello(at)widesoft(dot)com(dot)br>
To: "Tomasz Myrta" <jasiek(at)klaster(dot)net>
Cc: "Lista dyskusyjna pgsql-sql" <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Executing dynamic queries (EXECUTE)
Date: 2004-02-02 10:37:03
Message-ID: 001501c3e978$7fbdd340$16011aac@widesoft.com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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(at)klaster(dot)net>
To: "Carla Mello" <carla(dot)mello(at)widesoft(dot)com(dot)br>
Cc: "Lista dyskusyjna pgsql-sql" <pgsql-sql(at)postgresql(dot)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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Paul Czubilinski 2004-02-02 15:10:04 SQL query
Previous Message Tom Lane 2004-02-02 04:26:22 Re: update more than 1 table (mysql to postgres)