Pad Left

This function pads a string to a specific length by adding a specified leading character. It returns a String data-type value.

If the data to be padded is longer than the field length, no change is made to the data.

The syntax is: 

Pad LeftS{<expression>,<pad character>, <field length>}

Input arguments

Argument Name

Data Type

Description

expression

String

S

The column whose values are to be padded

pad characters

String

S

The character to use to pad the string to the desired number of characters.

field length Integer I The desired field length

Example

This example pads the Part Number strings to 10 characters using a leading zero to reach the length.

Pad LeftS{Part NumberS,0S, 10I}

Part Number Results
1234 0000001234
1234567 0001234567
123456789 0123456789
xyz 0000000xyz
A123456789 A123456789

Last modified: Friday July 26, 2024

Is this useful?