Skip Headers
Oracle® OLAP Expression Syntax Reference
Release 11.2

Part Number E23381-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
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
OLAXS471

SUBSTR

SUBSTR returns a portion of string, beginning at a specified character position and extending a specified number of characters.

Return Value

CHAR | NCHAR | VARCHAR2 | NVARCHAR2

Syntax

{ SUBSTR | SUBSTRB | SUBSTRC }(char, position [, substring_length ])

Arguments

char is a text expression that provides the base string from which the substring is derived.

position identifies the first character of the substring:

substring_length is the number of characters in the returned string. By default, the function returns all characters to the end of the base string. If you specify a value less than 1, then the function returns a null.

Examples

SUBSTR('firefly', 1, 4) returns the substring fire.

SUBSTR('firefly', -3, 3) returns the substring fly.

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