Syntax for substring
Moderators: chulett, rschirm, roy
Syntax for substring
Can anyone please help me getting syntax for substring.
My requirement is...
I have a column having data like 0000000000012345678(length is 19)and i want to populate it to the target side as 00000012345678(length is 14).how to do it??
is there any inbuilt function in parallel job???
Regards,
ambasta
My requirement is...
I have a column having data like 0000000000012345678(length is 19)and i want to populate it to the target side as 00000012345678(length is 14).how to do it??
is there any inbuilt function in parallel job???
Regards,
ambasta
ambasta
Yes, you can use the syntax of In.ColumnName[6,14] or even a RIGHT(In.ColumnName,14).
Last edited by ArndW on Tue Oct 03, 2006 6:01 am, edited 1 time in total.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 437
- Joined: Fri Oct 15, 2004 6:13 am
- Location: Pune, India
Thanx a lot your kind suggessions,but,unfortunately these functions are not working for me.Somehow i made this work,but i don't know how it is working.
Ex..if i need last 14 element out of 19 then IN.Col[16,14] is working and if i need last 12 element out of 19 then InCol[18,12] is working.
Can anyone help me???
Ex..if i need last 14 element out of 19 then IN.Col[16,14] is working and if i need last 12 element out of 19 then InCol[18,12] is working.
Can anyone help me???
ambasta
Thanx a lot your kind suggessions,but,unfortunately these functions are not working for me.Somehow i made this work,but i don't know how it is working.
Ex..if i need last 14 element out of 19 then IN.Col[16,14] is working and if i need last 12 element out of 19 then InCol[18,12] is working.
Can anyone help me???
Ex..if i need last 14 element out of 19 then IN.Col[16,14] is working and if i need last 12 element out of 19 then InCol[18,12] is working.
Can anyone help me???
ambasta
Thanx a lot for your kind suggessions,but,unfortunately these functions are not working for me.Somehow i made this work,but i don't know how it is working.
Ex..if i need last 14 element out of 19 then IN.Col[16,14] is working and if i need last 12 element out of 19 then InCol[18,12] is working.
Can anyone help me???
Ex..if i need last 14 element out of 19 then IN.Col[16,14] is working and if i need last 12 element out of 19 then InCol[18,12] is working.
Can anyone help me???
ambasta
Thanx a lot for your kind suggessions,but,unfortunately these functions are not working for me.Somehow i made this work,but i don't know how it is working.
Ex..if i need last 14 element out of 19 then IN.Col[16,14] is working and if i need last 12 element out of 19 then InCol[18,12] is working.
Can anyone help me???
Ex..if i need last 14 element out of 19 then IN.Col[16,14] is working and if i need last 12 element out of 19 then InCol[18,12] is working.
Can anyone help me???
ambasta
Actually the incoming column's dataype is Decimal(19,4) and target datatype is char(15) as i am writing to file.My requirement is to multiply input column by 10,000 and then populate it to fixed width file.this is the actual data that i am getting 000000000000019.0000 and my requirement is to populate it as 000000000190000
ambasta
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Perform the calculation, then convert the decimal number to a string. You can use the Right() function to extract the relevant number of characters from the right-hand end.
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.