Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Product Manuals » ElevateDB Version 2 SQL Manual » SQL/PSM Functions » ROWSAFFECTED |
ROWSAFFECTED(<StatementName>) <StatementName> = Previously-executed statement
INTEGER
-- This procedure updates all Customers -- who have purchased a product last year and -- flags them to receive a mailer CREATE PROCEDURE UpdateMailer(OUT NumCustomers INTEGER) BEGIN DECLARE UpdateStmt STATEMENT; EXECUTE IMMEDIATE 'UPDATE Customers SET Mailer = False'; PREPARE UpdateStmt FROM 'UPDATE Customers SET Mailer = True ' + 'WHERE EXTRACT(YEAR FROM LastPurchased) = ' + 'EXTRACT(YEAR FROM CURRENT_DATE()) - 1'; EXECUTE UpdateStmt; SET NumCustomers = ROWSAFFECTED(UpdateStmt); UNPREPARE UpdateStmt; END
Deviation | Details |
Extension | This function is an ElevateDB extension. |
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 |