Need UDF to concat 4 inputs of variable length
I have a requirement where i need to concat 4 fields as an input to get the desired reuslt.
Input1- fix length
Input2 - fix length
Input3- Variable length
Input4- Variable length.
I want the desired output of input3 to be of length 10 and and of input4 to be of length 18.
If the length is less than the desired output it should add spaces in the end.
Than utput need to be 330001JPOW SEMISOFT COAL
Can you please suggest how to achieve this?