Thank you all for the helping.
I made a bit changes as the following and it works.
CREATE OR REPLACE FUNCTION update_code_map(VARCHAR, VARCHAR) RETURNS
VARCHAR AS $$
DECLARE
tableName ALIAS FOR $1;
st1_tabno_value ALIAS FOR $2;
rec_num INTEGER;
query_value
On Thu, 11 Aug 2005, Ying Lu wrote:
> Greetings,
>
> I met a question about how to use *function variable *as the *table
> name* to select count(*) into an integer variable for the table.
>
>
> CREATE OR REPLACE FUNCTION update_code_map(VARCHAR, VARCHAR) RETURNS
> VARCHAR AS $$
> DECLARE
> *ta
Ying Lu wrote:
Greetings,
I met a question about how to use *function variable *as the *table
name* to select count(*) into an integer variable for the table.
Look at: FOR-IN-EXECUTE
http://www.postgresql.org/docs/8.0/static/plpgsql-control-structures.html#PLPGSQL-RECORDS-ITERATING
--
Ric