Removing left padding zero in SSIS

2019-08-05 13:23发布

问题:

How to remove left padding zero in column values.The data type of column is Unicode string[DT_WSTR]. Please Help me.

回答1:

Cast it to DT_I4 then back to DT_WSTR, that should get rid of the leading zeros.



回答2:

Replace(Ltrim(Replace(column1, '0', ' ')), ' ', '0')

This will remove your leading zero, but make sure you string doesn't have any white spaces,this code will not work for such case



标签: ssis