Doubt in Plpgsql

Поиск
Список
Период
Сортировка
От shreedhar
Тема Doubt in Plpgsql
Дата
Msg-id 001501c2054a$cc98f410$1201a8c0@a4005
обсуждение исходный текст
Список pgsql-admin
Hi all,
    I am sorry for putting this question in this list. Hope some body may know 'plpgsql' in postgres.
    As I am practicing plpgsql I wrote the following code which is not retrieving data.
 
declare
 temprec record;
 funcs text;
 funcid integer;
 
begin
 funcs := 'success';
 
 for temprec in select * from tbldefaultaccounts loop
 -- if record belongs to project function
  if temprec.isfunction = 't' then
   funcid := 1;
   select functionid into funcid from tblFunctionHierarchy where HierarchyName = temprec.fname;
   funcs := funcs || ', ' ||  funcid ;
 
  end if;
 end loop;
 
 return funcs;
 
end;
 
Can any body say what is problem with this code. I hope it might have problem after where condition.
 
where tbldefaultaccounts is
            daccid serial;
            fname varchar(50);
 
and tblFunctionHierarchy is
        functionid serial;
        name varchar(50);

В списке pgsql-admin по дате отправления:

Предыдущее
От: Niclas Gustafsson
Дата:
Сообщение: Re: Problem with ucred.h building 7.2.1
Следующее
От: l.malaspina@focal.fr
Дата:
Сообщение: Réf. : Re: File systems backup problem