Skip Headers
Oracle® OLAP DML Reference
11g Release 2 (11.2)

Part Number E17122-07
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub
OLADM527

EXTCHARS

The EXTCHARS function extracts a portion of a text expression.

Tip:

When you are using a multibyte character set, you can use the EXTBYTES function instead of the EXTCHARS function.

Return Value

TEXT or NTEXT

Syntax

EXTCHARS(text-expression [start [length]])

Parameters

text-expression

A TEXT or NTEXT expression from which a portion is to be extracted. When text-expression is a multiline text value, EXTCHARS preserves the line breaks in the returned value.

start

An INTEGER that represents the character position at which to begin extracting. The position of the first character in text-expression is 1. When you omit this argument, EXTCHARS starts with the first character.

length

An INTEGER that represents the number of characters to be extracted. When length is not specified, or exceeds the number of characters from start to the end of text-expression, the part from start to the end of text-expression is extracted.

Examples

OLADM1615Example 7-83 Extracting Text Characters

This example shows how to extract portions of text from the TEXT value 'hellotherejoe'.

  • The statement

    SHOW EXTCHARS('hellotherejoe', 6, 5)
    

    produces the following output.

    there
    
  • The statement

    SHOW EXTCHARS('hellotherejoe', 11)
    

    produces the following output.

    joe 
    
Reader Comment

   

Comments, corrections, and suggestions are forwarded to authors every week. By submitting, you confirm you agree to the terms and conditions. Use the OTN forums for product questions. For support or consulting, file a service request through My Oracle Support.

Hide Navigation

Quick Lookup

Database Library · Master Index · Master Glossary · Book List · Data Dictionary · SQL Keywords · Initialization Parameters · Advanced Search · Error Messages

Main Categories

This Document

New and changed documents:
RSS Feed HTML RSS Feed PDF