SAND CDBMS Tools Reference Guide
NDL++ Functions:
Syntax and Examples


Return to String Function Index

 

String Function Syntax and Examples


MID( )

The MID() function returns a specified number of characters from a string.

Syntax:

MID(string,start-position[,length])  

where:


Example:

input: samplestring

IMPORT @sample.dat
{

RECORD
{
field1 *\r\n
}
schema1.table1
{
col1 MID(field1,2,3)
col2 MID(field1,15,4)
col3 MID(field1,7,31)
col4 MID(field1,7,-1)
}

}


Results:

schema1.table1.col1 amp
schema1.table1.col2 ''
(empty string, length =0)
schema1.table1.col3 string
schema1.table1.col4 string

 

Return to String Function Index