Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id AE5529FB672 for ; Thu, 25 Jan 2007 20:56:28 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 61761-02 for ; Thu, 25 Jan 2007 20:56:24 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from sapo.pt (relay2.ptmail.sapo.pt [212.55.154.22]) by postgresql.org (Postfix) with SMTP id 898AC9FB634 for ; Thu, 25 Jan 2007 20:56:24 -0400 (AST) Received: (qmail 22337 invoked from network); 26 Jan 2007 00:56:21 -0000 Received: from unknown (HELO sapo.pt) (10.134.35.152) by relay2 with SMTP; 26 Jan 2007 00:56:21 -0000 Received: (qmail 2367 invoked from network); 26 Jan 2007 00:56:20 -0000 X-AntiVirus: PTMail-AV 0.3-0.88.6 X-Virus-Status: Clean (0.00689 seconds) Received: from unknown (HELO hmv02) (hmv@[82.155.147.254]) (envelope-sender ) by mta2 (qmail-ldap-1.03) with SMTP for ; 26 Jan 2007 00:56:20 -0000 Message-ID: <004401c740e4$d2213020$6200a8c0@hmv02> From: =?iso-8859-2?Q?H=E9lder_M._Vieira?= To: References: <002901c740b9$56fff190$6500a8c0@bixerverintel> Subject: Re: Looping recordset Date: Fri, 26 Jan 2007 00:56:19 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-2"; reply-type=response Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.3028 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.229 tagged_above=0 required=5 tests=AWL, BAYES_50, FORGED_RCVD_HELO, RCVD_IN_NJABL_PROXY, SPF_HELO_PASS, SPF_PASS X-Spam-Level: X-Archive-Number: 200701/128 X-Sequence-Number: 27280 > 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