Need to fetch integer part from decimal data
Moderators: chulett, rschirm, roy
Need to fetch integer part from decimal data
my source data contains value as "1234.56" which is of decimal(17,2) datatype.
In my target table:
i want only the integer part of above value appended with zeroes at the starting for varchar2(16) datatype.
in target value needed is "0000000000001234"
Please let me know what function can be used to take only integer value without dot.
Thanks in advance,
In my target table:
i want only the integer part of above value appended with zeroes at the starting for varchar2(16) datatype.
in target value needed is "0000000000001234"
Please let me know what function can be used to take only integer value without dot.
Thanks in advance,
Re: Need to fetch integer part from decimal data
HemaV wrote:target value needed is "0000000000001234"
Please let me know what function can be used to take only integer value without dot.
Thanks in advance,
Why can't you use
Code: Select all
Field(in.source,'.',1)
Thanks
Ram
----------------------------------
Revealing your ignorance is fine, because you get a chance to learn.
Ram
----------------------------------
Revealing your ignorance is fine, because you get a chance to learn.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
A curious suggestion from someone who has "performance driven outcomes" in his signature block!
How many data type conversions (implicit or otherwise) does your "solution" require?
How many data type conversions (implicit or otherwise) does your "solution" require?
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.
Ray
Nothing to do with signature:)
Its all about providing the number of ways things can be handled and the poster will get an idea about handling the ways!!
I do failed to add a point at the time when i post my comment as "Ugly way"![Smile :)](./images/smilies/icon_smile.gif)
But you are our DS guru and i am in the same page with your comment.
Nothing to do with signature:)
Its all about providing the number of ways things can be handled and the poster will get an idea about handling the ways!!
I do failed to add a point at the time when i post my comment as "Ugly way"
![Smile :)](./images/smilies/icon_smile.gif)
But you are our DS guru and i am in the same page with your comment.
Thanks
Ram
----------------------------------
Revealing your ignorance is fine, because you get a chance to learn.
Ram
----------------------------------
Revealing your ignorance is fine, because you get a chance to learn.
-
- Premium Member
- Posts: 1735
- Joined: Thu Mar 01, 2007 5:44 am
- Location: Troy, MI
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: