Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Product Manuals » ElevateDB Version 2 SQL Manual » SQL/PSM Statements » ITERATE |
ITERATE [<Label>]
-- This procedure deletes all rows -- in the Customers table with a State -- column of 'FL' CREATE PROCEDURE DeleteFLCustomers() BEGIN DECLARE CustCursor CURSOR WITH RETURN FOR Stmt; DECLARE State CHAR(2) DEFAULT ''; PREPARE Stmt FROM 'SELECT * FROM Customer'; OPEN CustCursor; FETCH FIRST FROM CustCursor ('State') INTO State; WHILE NOT EOF(CustCursor) DO IF (State='FL') THEN DELETE FROM CustCursor; FETCH FROM CustCursor ('State') INTO State; ITERATE; END IF; FETCH NEXT FROM CustCursor ('State') INTO State; END WHILE; END
Deviation | Details |
Optional Label | The label is optional in ElevateDB, and if not provided, defaults to the current loop being executed. |
This web page was last updated on Thursday, November 16, 2023 at 10:39 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |