Input is a txt file and output table.
Input
0001
0002
0003
0001,0002
0005
0003,0004
Need out put like
01
02
03
01,02
05
03,04
Leading Zeros
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
The FMTS() function will be of even more use.
The inner Convert() changes commas to value marks.
The Fmts() function applies the format specification to each value in the multi-valued field.
The outer Convert() changes the values marks back to commas.
Code: Select all
Convert(@VM,",",Fmts(Convert(",",@VM,InLink,TheString),"2R"))
The Fmts() function applies the format specification to each value in the multi-valued field.
The outer Convert() changes the values marks back to commas.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: