July 30, 2008 at 10:49 am
Hi All,
I have numbers like 121212122, 12364232, 12367
I just wanted these numbers as 121.2, 124.0, 124.0
Can someone help me out with this......
July 30, 2008 at 11:50 am
Latheesh,
The question, as posed, can't be answered. We need more information before we can assist.
For example: is the precision of the desired output known? Can the precision of the input be predetermined?
--SJT--
July 30, 2008 at 9:20 pm
Thanks for your reply.Sorry if I took you to a dark as my question is not clear....
There should be only 3 digits before the decimal point and 1 digit after decimal point.
1234567 --> 123.5 (the digit after decimal is rounded)
1235678 --> 124.0
Is ther any system function to do the same.
Can we work out with decimal conversion on the same.
I dont wanna to be more complicated by dividing with 1000 or any multiplies of 100....
Wnna make this task easier.
Is there any way to do....or can I give more details on the same....
August 1, 2008 at 5:51 am
This kinda looks like homework.
I'd recommend looking at the STUFF, CAST or CONVERT, and ROUND functions in the help files...
--Todd
August 1, 2008 at 10:59 pm
Based on the previous questions asked by Lateesh, I'm gonna say this isn't homework...
SELECT STR(STUFF(1234567,4,0,'.') ,5,1)
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply