Re: [SQL] NEED HELP COPY TO DYNAMIC OUTPUT FILE

2009-08-31 Thread Yogi Dwianandono Rizkiadi
Thanks guys for the quick reply, i've solve it with using EXECUTE :P Here is my fully code : -- Function: etiket_ho.fn_settlement(integer) -- DROP FUNCTION etiket_ho.fn_settlement(integer); CREATE OR REPLACE FUNCTION etiket_ho.fn_settlement(integer) RETURNS void AS $BODY$ DECLARE i inte

[SQL] PostgreSQL Function: how to know the number of the returned results of the Query

2009-08-31 Thread bilal ghayyad
Hi List; I am building a function in the SQL (PostgreSQL), so I will be able to call this function using a SELECT query. Inside the body of this function, I was need to do the following but not able to know how: I have a SELECT statement (inside the function script itself), and I need to know

Re: [SQL] PostgreSQL Function: how to know the number of the returned results of the Query

2009-08-31 Thread Pavel Stehule
Hello look on PERFORM and GET DIAGNOSTICS statements http://www.postgresql.org/docs/8.2/static/plpgsql-statements.html#PLPGSQL-STATEMENTS-SQL-NORESULT http://www.postgresql.org/docs/8.2/static/plpgsql-statements.html#PLPGSQL-STATEMENTS-DIAGNOSTICS regards Pavel Stehule 2009/9/1 bilal ghayyad :