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


Return to String Function Index

 

String Function Syntax and Examples


LPAD( )

The LPAD() function adds a specified character to the left side of a string to achieve the specified length. If length is less than the length of string, the original string is returned.

Syntax:

LPAD(string,length,char)

where:

Example:

input: samplestring

IMPORT @sample.dat
{

RECORD
{
field1 *\r\n
}
schema1.table1
{
col1 LPAD(field1,17,'A')
col2 LPAD(field1,6,'A')
}

}


Results:

schema1.table1.col1 AAAAAsamplestring
schema1.table1.col2 samplestring

 

Return to String Function Index