Leading Zeros Missing on .txt file Derived Column Transformation ?
Team , Unfortunately i'm out of luck figuring out this simple issue , I tried both of these expressions and nothing worked for me ..I'm just trying to simply pad up Zeros to one column: These are what i tried in derived column expression .. RIGHT("0000" + Code,4) RIGHT("0000" + (DT_WSTR,4)Code,4) Nothing seems to be working .. I get 0005 from DB and it prints 5 on file . Thanks in advance for your inputs .Rajkumar Yelugu
November 2nd, 2012 2:22am
Somehow the data is still converted to a number. Check the column metadata in the flat file connection manager. Regards, Team.MCTS, MCITP - Please mark posts as answered where appropriate.
November 2nd, 2012 3:07am
Agree, checkout the data type. It should be string, otherwise the leading zero's will be gone... and if you open the file in Excel then Excel usually removes them, so check it in notepadPlease mark the post as answered if it answers your question | My SSIS Blog: http://microsoft-ssis.blogspot.com | Twitter
November 2nd, 2012 3:10am
Hi Rajkumar, You may try trim Function if you are sure that after padding zeros column is not converted to INT. RIGHT("0000" + LTRIM(RTRIM((DT_STR)Code)),4) Rajkumar
November 2nd, 2012 3:11am