Re: Looping recordset

Поиск
Список
Период
Сортировка
От Hélder M. Vieira
Тема Re: Looping recordset
Дата
Msg-id 004401c740e4$d2213020$6200a8c0@hmv02
обсуждение исходный текст
Ответ на Looping recordset  ("Furesz Peter" <spam@srv.hu>)
Список pgsql-sql
>    DECLARE
>        v_tmp_regi RECORD;
>        v_tmp RECORD;
>    BEGIN
>      SELECT * INTO v_tmp_regi FROM sulyozas_futamido sf WHERE 
> sf.termekfajta_id=
>      a_termekfajta_id AND sf.marka_id=a_marka_id;
>
>        DELETE FROM sulyozas_futamido;
>
>        FOR v_tmp IN v_tmp_regi LOOP
>            --I would like to work here with the old recordset!
>        END LOOP;
>        ^^^^^^^^^^^^^^
>       -- This is not working !!!


I'd say v_tmp_regi is a record variable, it is supposed to hold one record, 
not a set of records.
Depending on the purpose, I'd probably use a temporary table to hold the 
selected rows or, perhaps, use the SELECT in the FOR..LOOP and subsequently 
perform the DELETE.


Hélder M. Vieira 



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

Предыдущее
От: "Rob V"
Дата:
Сообщение: Re: LEFT Join Question
Следующее
От: "codeWarrior"
Дата:
Сообщение: Re: LEFT Join Question