dynamic sql statements and OUT variables - Mailing list pgsql-novice

From Girish Bajaj
Subject dynamic sql statements and OUT variables
Date
Msg-id 008301c355a6$85f6ec30$7764a8c0@tietronix.com
Whole thread Raw
List 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

 

 

 

 

pgsql-novice by date:

Previous
From:
Date:
Subject: Re: Retrieving NULL records
Next
From: "Henshall, Stuart - TNP Southwest"
Date:
Subject: Re: dynamic sql statements and OUT variables