![]() | ![]() Products ![]() ![]() ![]() ![]() |
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 Friday, January 31, 2025 at 08:42 AM | Privacy Policy![]() © 2025 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |