how to do a select distinct within pgplsql

Поиск
Список
Период
Сортировка
От Feite Brekeveld
Тема how to do a select distinct within pgplsql
Дата
Msg-id 3ACB9886.67EE75F3@osiris-it.nl
обсуждение исходный текст
Список pgsql-general
Hi,

I want to do  the following:

<snip>
create function ...
as
...

BEGIN

   FOR myrec IN select distinct id from table where condition
   LOOP

   END LOOP;
END;

Now this doesn't work because the FOR IN statment expects a complete record. How to deal with this ?
Tried CURSOR but that led to errors too.

Thanks,
 

--
Feite Brekeveld
feite.brekeveld@osiris-it.nl
 
 
 

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Re: php Compile question
Следующее
От: Martín Marqués
Дата:
Сообщение: Re: Re: php Compile question