Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Product Manuals » ElevateDB Version 2 SQL Manual » SQL/PSM Statements » REPEAT |
[Label:] REPEAT <StatementBlock> UNTIL <BooleanExpression> END REPEAT [Label]; <StatementBlock> = <StatementBlock> = [[Label:] BEGIN] [<Statement>;] [<Statement>;] [EXCEPTION] [<Statement>;] [END [Label];]
-- This function simply repeats a -- a string the specified number of times -- and returns the resultant string CREATE FUNCTION RepeatString(IN "StringToRepeat" VARCHAR, IN "RepeatCount" INTEGER) RETURNS VARCHAR BEGIN DECLARE I INTEGER DEFAULT 1; DECLARE Result VARCHAR DEFAULT ''; IF RepeatCount = 0 THEN LEAVE; END IF; REPEAT SET Result = (Result + StringToRepeat); SET I = (I + 1); UNTIL (I > RepeatCount) END REPEAT; RETURN Result; END
Deviation | Details |
None |
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 |