dynamic sql statements and OUT variables

From: "Girish Bajaj" <gbajaj(at)tietronix(dot)com>
To: <pgsql-novice(at)postgresql(dot)org>
Subject: dynamic sql statements and OUT variables
Date: 2003-07-29 07:53:39
Message-ID: 008301c355a6$85f6ec30$7764a8c0@tietronix.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

1) How do I get the value back for this dynamic statement?

minUserID := execute ''SELECT MIN(userid) as minID FROM '' ||
campQueueTableName;

campQueueTableName and minUserID are variables. The language is plpgsql. I
want the value of what comes back in the MIN to be stored in the variable.

2) How do I do this?

Select myValue := userid FROM table1;

Where I want the value of what comes out from userid col, to go into the
variable declared as myValue. Language is plpgsql.

Thanks,

Girish

Browse pgsql-novice by date

  From Date Subject
Next Message Henshall, Stuart - TNP Southwest 2003-07-29 08:21:11 Re: dynamic sql statements and OUT variables
Previous Message email 2003-07-29 06:40:03 Re: Retrieving NULL records