0
DROP ROUTINE IF EXISTS InsertChar;
CREATE FUNCTION InsertChar( OrigString CHAR(20), cChar CHAR, cPosition INTEGER)
RETURNS CHAR(21) 
DETERMINISTIC
BEGIN
  IF (OrigString IS NULL) OR (CHAR_LENGTH(OrigString) < cPosition) THEN
    RETURN OrigString;
  ELSE
    RETURN SubString(OrigString FROM 1 FOR (cPosition-1)) || cChar || SubString(OrigString FROM cPosition);
  END IF;
END;
Category: 
SQL Functions & Procedures
Current Version: 
1.00
Supported Products: 
NexusDB V2
NexusDB V3
Home