Table of ContentsPreviousNext

Please, note, that Ispirer SQLWays 6.0 is no longer supported and provided to clients.
You can try out automated conversion of databases and applications with Ispirer Toolkit for free. Download free trial.
Check out the relevant toolkit documentation.
Ispirer DB2 to SQL Server Migration overview.

Ispirer SQLWays Database Migration Software



SUBSTR(string, start [, length])

SUBSTR returns part of a character string beginning at start position, length characters long.

if start is positive, Oracle counts from the beginning of the string.

if start is negative, Oracle counts backwards from the end of the string.

if length is omitted, Oracle returns all characters to the end of the string.


This example returns the full first name in one column, and only the first initial in the second column.

SELECT au_fname, SUBSTR(au_fname, 1, 1)
Here is the result set: 
Albert             	A
Ann                 	A
Anne                	A
Michael 	M
Michel               	M 

Equivalents in other databases

TABLE 84. Equivalents in other databases
SUBSTR, LEFT and RIGHT functions
Microsoft SQL Server
SUBSTRING , LEFT and RIGHT functions

Table of ContentsPreviousNext
Copyright 1999-2023 Ispirer Systems.
Ispirer and SQLWays are registered trademarks. All other product names may be trademarks of the respective companies.
All rights reserved.