![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
I get various material numbers like the following: 20890 138902 DEDKL2 XYFGAB Now what I mean by alpha conversion is if the string a purely numeric the left hand side must be padded with zeros if it is alpabetic or alphanumeric the left had side must be left as it is. In the above case my field width is 10 so the above must be padded after transformation as follows: 0000020890 0000138902 DEDKL2 XYFGAB as you can see it as to see the number of characters in the string and tab with that many zeros on the left hand side. Also, given sometimes I get the data in the above with left padded how do I remove all the left zeros and extract from the first nonzero. Please advise me how I can do this in DTS - VB Script sample code or in T-SQL I have the unmodified data in a staging table if SQL can generate this sequence please can you share the code. Thanks Karen |
![]() |
| Thread Tools | |
| Display Modes | |
| |