Lpad Function; Examples Of Lpad - HP Neoview SQL Reference Manual

Hide thumbs Also See for Neoview SQL:
Table of Contents

Advertisement

LPAD Function

The LPAD function pads the left side of a string with the specified string.
LPAD is a Neoview extension.
LPAD (str, len [,padstr])
str
can be an expression. See
len
can be an expression but must be an integral value. If len is equal to the length of the string,
no change is made. If len is smaller than the string size, the string is truncated.
pad-character
can be an expression and may be a string.

Examples of LPAD

This function returns ' kite':
lpad('kite', 7)
This function returns 'ki':
lpad('kite', 2)
This function returns '0000kite':
lpad('kite', 8, '0')
This function returns 'go fly a kite':
lpad('go fly a kite', 13, 'z')
This function returns 'John,John, go fly a kite'':
lpad('go fly a kite', 23, 'John,')
"Character Value Expressions" (page
208).
LPAD Function
359

Advertisement

Table of Contents
loading

Table of Contents