Re: [SQL] set return function is returning a single record, multiple

2006-04-28 Thread Alexis Paul Bertolini
CREATE or replace FUNCTION ftoc9() RETURNS setof structrankmaster2 LANGUAGE 'plpgsql' AS' DECLARE rowdata pss%rowtype; BEGIN for i in 1..3 loop select * into rowdata from pss ; return next rowdata ; end loop; return; end'; The query should be outside the loop, otherwise you are re

Re: [SQL] set return function is returning a single record, multiple times,how can i get all the records in the table( description inside )

2006-04-28 Thread A. Kretschmer
am 28.04.2006, um 16:14:10 +0530 mailte Penchalaiah P. folgendes: > 4) The following is the function that retrieves the records from pss : > > CREATE or replace FUNCTION ftoc9() RETURNS setof structrankmaster2 > LANGUAGE 'plpgsql' > > AS' DECLARE > rowdata pss%rowtype; > BEGIN for i in 1..

[SQL] set return function is returning a single record, multiple times,how can i get all the records in the table( description inside )

2006-04-28 Thread Penchalaiah P.
Hi   Please spare some time to provide a solution for the described problem :   I am using set returning functions to return all the records from a table named  pss , But what I am getting is the first record is returned as many  times , the number of records present in the rank_mas