Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
shabarish0587
Contributor
Contributor

Need to insert zero values in existing column

Hi Friends,

 

            I need one help, i.e. i have two different tables. in table 1 column value is like this T0000451  and another table column value is like this T451. my question, is it possible to create a column from second table like this T0000451. that means i want to add zeros values in second table. i am giving sample inputs. Thanks in advance

Given Inputs:  

Column 1Column 2
T0000451T451
T0000452T452
T0000442T442
T0000453T453
T0000531T531
T0000532T532
T0000533T533

 

Expected Output:

Column 1Column 2
T0000451T0000451
T0000452T0000452
T0000442T0000442
T0000453T0000453
T0000531T0000531
T0000532T0000532
T0000533T0000533
1 Solution

Accepted Solutions
StarinieriG
Partner - Specialist
Partner - Specialist

Hi,

 

you could try in this way:

 

Replace(Column2,'T','T0000')

View solution in original post

3 Replies
Frank_Hartmann
Master II
Master II

in script something like this:

left(Column2,1)&'0000'&right(Column2,3) as NewField

left([Column 2],1)&'0000'&subfield([Column 2],'T',2) as NewField

hope this helps

StarinieriG
Partner - Specialist
Partner - Specialist

Hi,

 

you could try in this way:

 

Replace(Column2,'T','T0000')

barakovskikh
Contributor III
Contributor III

'T' & Num(Keepchar(Column2,'0123456789'),'0000000')