cancel
Showing results for 
Search instead for 
Did you mean: 

Fixed length concatenation

0 Kudos

Hi,

I am working on a scenario wherin i have to concatenate fields(around 30) on the source side and map it to a single target field.I have to map it as a fixed length i.e., if a field on the source side is of length 10 and if we pass only 5 characters, the remaining 5 plsces should be spaces and the next field should start from the 11th position as shown below

source data target concat data(with spaces)

filed1(10) abcd field abcd 123

field2(5) 123

Can any one please help me in solving this.

Thanks,

Vikram

Accepted Solutions (0)

Answers (1)

Answers (1)

RKothari
Contributor
0 Kudos

Hi,

UDF can be used to solve your problem. A UDF can hold 20 input fields. So, you have to use 3 UDFs. In the First two UDF, you can concatenate the input fields and also check for the spaces. In third UDF, you will be concatenating the Output of First two UDF.

Concatenation can be done as : String3 = String2 + String1 in the UDFs.

I hope this would solve your problem.

Regards,

Rahul