Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 Padding a field

Author  Topic 

murrayb3024
Yak Posting Veteran

79 Posts

Posted - 2009-01-26 : 15:12:35
What would be the easiest way to take a field (myField) and pad it to a certain length with leading zeros? I know that I could do it with code as something like

tmpField = LEN(myField)
Do while tmpField < 9
myField = '0' & myField
tmpField = tmpField + 1
Loop

What control flow item would I use, and what is the syntax to do the same as the above?

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-01-27 : 00:45:16
you can use dervied column task available inside data flow task.
Go to Top of Page
   

- Advertisement -