LucidDbAppLib STR REPLACE

From Eigenpedia

Jump to: navigation, search

Contents

Syntax

APPLIB.STR_REPLACE ( in_string, old_string, new_string )

Purpose

Replaces all occurrences of the old_string with the new_string

Parameters

  • in_string [VARCHAR(65535)]: The existing input string where occurrences of the old_string will be replaced
  • old_string [VARCHAR(65535)]: The string to be replaced
  • new_string [VARCHAR(65535)]: The string which will replace old_string

Output

  • [VARCHAR(65535)] string with all replacements; if in_string or old_string is null, returns null, if new_string is null, occurrences of old_string will be replaced with the string 'null'

Example

NAME STR_REPLACE( NAME, 'in', 'oni' )
345 345
Bernard Walsh Bernard Walsh
Joan Yu Joan Yu
Martin Blair Martoni Blair
Mike Rodriguez Mike Rodriguez
Olivia Kuznetsov Olivia Kuznetsov
walter king walter konig

Source Code

http://p4web.eigenbase.org/open/dev/luciddb/src/com/lucidera/luciddb/applib/string/StrReplaceUdf.java



Return to LucidDbAppLib page

Personal tools