Scenario:
Sometimes we get the data from flat file and we want to remove Leading Zero, Trailing Zeros OR Leading and trailing both before insert into destination.
Solution:
I assumed that data we are getting is string type, coming from the source (Excel, Flat file etc.)Use the Derived column Transformation to remove Leading/Trailing OR Both zero from the string. After removing Zeros you can
Cast to Any data type you want such as Numeric, Integer, float etc.
Here are expressions to remove Leading Zeros, Trailing Zeros or Both from string column.
Leading Zeros:
(DT_WSTR,50)(DT_I8)[YourInputColumn]
Trailing Zeros:
REVERSE((DT_WSTR,50)(DT_I8)REVERSE([YourInputColumn]))
Leading and Trailing Zeros:
REVERSE((DT_WSTR,50)(DT_I8)REVERSE((DT_WSTR,50)(DT_I8)[YourInputColumn]))
Aivivu đại lý vé máy bay, tham khảo
ReplyDeletevé máy bay đi Mỹ giá bao nhiêu
mua vé máy bay từ mỹ về việt nam hãng eva
vé máy bay giá rẻ từ Canada về Việt Nam
khi nào mở lại đường bay nhật bản việt nam
Có chuyến bay từ Hàn Quốc về Việt Nam không
Vé máy bay từ Đài Loan về VN
giá khách sạn cách ly ở việt nam
chuyến bay chuyên gia về việt nam
Thanks for sharing wonderful information Nissan maginte on road price in hyderabad
ReplyDelete