Previous Topic: Initial UppercaseNext Topic: Invert Sign


Insert

The insert function returns the string that results from a specified string being inserted into a string value starting at a specified position.

Syntax:

►►─┬─ INS ────┬─ (string, insertion-string, starting-position) ───────────────►◄
   └─ INSERT ─┘

Invocation names:

INS
INSERT

Parameters:

string

Specifies the string into which insertion-string is inserted.

insertion-string

Specifies the string that is inserted into the string specified by string.

starting-position

Specifies the numeric starting position for the insertion. If starting-position is one or less, insertion starts at the beginning of the string value. If starting-position is greater than the length of string, insertion starts at the end of the string value.

Example:

This example flags the last named of employees living in Boston with asterisks '**':

select insert(emp-last-name-0415,'**',1) from employee
 where emp-city-0415 eq boston

  '**OTT             '
  '**LIGARE          '