Concatenate
Moderators: chulett, rschirm, roy
Concatenate
Hi all,
My input date is like this......
Hmphonenumber
212-790-2820
607-871-2144
215-563-6417
804-924-4245
213-680-5200
858-453-4100
206-622-2294
-------------
I need to get the phone number without the delimeter' -'Ex:2127902820
I am useing field function and writeing to a stage variable A,B,C
1) Field(lk_AccInfo.AI_HomePhone,'-',1,1)---->211 (A)
2)Field(lk_AccInfo.AI_HomePhone,'-',2,1)---->790 (B)
3)Field (lk_AccInfo.AI_HomePhone,'-',3,1)---->2820(C)
I am trying to concatenate (in transformer Stage) all the variables but I am getting 211 only insetad of 2117902820
Is there any other ways to implements???
Thanks in advance
My input date is like this......
Hmphonenumber
212-790-2820
607-871-2144
215-563-6417
804-924-4245
213-680-5200
858-453-4100
206-622-2294
-------------
I need to get the phone number without the delimeter' -'Ex:2127902820
I am useing field function and writeing to a stage variable A,B,C
1) Field(lk_AccInfo.AI_HomePhone,'-',1,1)---->211 (A)
2)Field(lk_AccInfo.AI_HomePhone,'-',2,1)---->790 (B)
3)Field (lk_AccInfo.AI_HomePhone,'-',3,1)---->2820(C)
I am trying to concatenate (in transformer Stage) all the variables but I am getting 211 only insetad of 2117902820
Is there any other ways to implements???
Thanks in advance
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Welcome aboard.
Your Field() functions are good. Show us how you are attempting the concatenation. What is should look like is:
1) Field(lk_AccInfo.AI_HomePhone,'-',1,1)---->211 (svA)
2) Field(lk_AccInfo.AI_HomePhone,'-',2,1)---->790 (svB)
3) Field (lk_AccInfo.AI_HomePhone,'-',3,1)---->2820 (svC)
4) svA : svB : svC -----> 2117902820 (outputcolumn)
Your Field() functions are good. Show us how you are attempting the concatenation. What is should look like is:
1) Field(lk_AccInfo.AI_HomePhone,'-',1,1)---->211 (svA)
2) Field(lk_AccInfo.AI_HomePhone,'-',2,1)---->790 (svB)
3) Field (lk_AccInfo.AI_HomePhone,'-',3,1)---->2820 (svC)
4) svA : svB : svC -----> 2117902820 (outputcolumn)
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.
Thanks ray,ray.wurlod wrote:Welcome aboard.
Your Field() functions are good. Show us how you are attempting the concatenation. What is should look like is:
1) Field(lk_AccInfo.AI_HomePhone,'-',1,1)---->211 (svA)
2) Field(lk_AccInfo.AI_HomePhone,'-',2,1)---->790 (svB)
3) Field (lk_AccInfo.AI_HomePhone,'-',3,1)---->2820 (svC)
4) svA : svB : svC -----> 2117902820 (outputcolumn)
I am implementing the same as specified, but getting 211 of the first Variable only.
skp,
Just addition to that, in my opinion the simpler would be,
OR
If your phone no format will be same in future also then,
If your issue has been resolved, please post your code for other's reference.
Just addition to that, in my opinion the simpler would be,
Code: Select all
Convert(lk_AccInfo.AI_HomePhone,'-','')
If your phone no format will be same in future also then,
Code: Select all
lk_AccInfo.AI_HomePhone[1,3] : lk_AccInfo.AI_HomePhone[5,7] : lk_AccInfo.AI_HomePhone[9,12]
Thanks and Regards!!
dspxlearn
dspxlearn
should readdspxlearn wrote:......Code: Select all
Convert(lk_AccInfo.AI_HomePhone,'-','')
Code: Select all
Convert('-','',lk_AccInfo.AI_HomePhone)
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
What happened that this suddenly became resolved? Most recently we had
Now the thread is marked as resolved!skp wrote:I am implementing the same as specified, but getting 211 of the first Variable only.
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.