Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Add Leading zeros in record


I have a transformation which loads data one to one from a view to a target.
Now I have a column varchar(5). I want add leading zeros whenever record length is less then length 5.
For example: if my record is '123,' I want to load it as '00123' or if my record is '8765', I want to load it as '08765'.

Thanks in advance.


1 Community Answers

Matillion Agent  

Kalyan Arangam —

Hi Adhiraj,

You may use a Calculator transformation component and write an expression for this operation.
Look into LPAD or similar function for your target database platform.

Hope that helps.


Post Your Community Answer

To add an answer please login