Recent PostsRecent Posts Popular TopicsPopular Topics
 Home Search Members Calendar Who's On

 Split integer valuefrom decimal valye Rate Topic Display Mode Topic Options
Author
 Message
 Posted Monday, July 7, 2008 5:45 AM
 SSC Journeyman Group: General Forum Members Last Login: Wednesday, September 29, 2010 3:02 AM Points: 89, Visits: 53
 Hi All,I want to split integer part from decimal value e.g. i have a no is 12456324.254 and i want to the output is 12456324Note: We can't use convert function
Post #529177
 Posted Tuesday, July 8, 2008 5:16 AM
 Forum Newbie Group: General Forum Members Last Login: Friday, February 12, 2016 5:00 AM Points: 1, Visits: 25
 Function floor() does not work?
Post #529900
 Posted Tuesday, July 8, 2008 5:31 AM
 SSC Journeyman Group: General Forum Members Last Login: Wednesday, September 29, 2010 3:02 AM Points: 89, Visits: 53
 Thanks,It is working
Post #529911
 Posted Tuesday, July 8, 2008 2:21 PM
 Old Hand Group: General Forum Members Last Login: 2 days ago @ 3:15 AM Points: 391, Visits: 2,501
 or, useROUND(YourValue, 1) (revised) I'm sorry... I meant ROUND(YourValue, 0, 1)I apologize for my lack of proof-reading.The non-zero 2nd parameter truncates the value, without changing the datatype.
Post #530358
 Posted Tuesday, July 8, 2008 2:40 PM
 SSC-Forever Group: General Forum Members Last Login: Today @ 8:45 AM Points: 42,066, Visits: 39,447
 indraprakash (7/7/2008)Note: We can't use convert functionThe ROUND function with the truncate option is definately the way to go... but why is it that you can't use the CONVERT function? --Jeff Moden"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".First step towards the paradigm shift of writing Set Based code: Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column." Helpful Links:How to post code problemsHow to post performance problems
Post #530365
 Posted Tuesday, July 8, 2008 10:18 PM
 SSC Journeyman Group: General Forum Members Last Login: Wednesday, September 29, 2010 3:02 AM Points: 89, Visits: 53
 Hi,round function not gives proper output floor is right.
Post #530475
 Posted Tuesday, July 8, 2008 10:53 PM
 SSC-Forever Group: General Forum Members Last Login: Today @ 8:45 AM Points: 42,066, Visits: 39,447
 indraprakash (7/8/2008)Hi,round function not gives proper output floor is right.Ummmm.... why do you think that? Using the optional 3rd parameter of ROUND makes it behave like FLOOR but with more control, if you need it. --Jeff Moden"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".First step towards the paradigm shift of writing Set Based code: Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column." Helpful Links:How to post code problemsHow to post performance problems
Post #530482
 Posted Wednesday, July 9, 2008 7:54 AM
 Old Hand Group: General Forum Members Last Login: 2 days ago @ 3:15 AM Points: 391, Visits: 2,501
 I'm sorry... I meant ROUND(YourValue, 0, 1)I apologize for my lack of proof-reading.
Post #530824
 Posted Wednesday, July 9, 2008 8:09 AM
 SSC-Forever Group: General Forum Members Last Login: Today @ 8:45 AM Points: 42,066, Visits: 39,447
 No problem and thanks for the feedback, Phil... I've made similar mistakes... just wanted to be sure...:) --Jeff Moden"RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row".First step towards the paradigm shift of writing Set Based code: Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column." Helpful Links:How to post code problemsHow to post performance problems
Post #530843
 Posted Monday, August 8, 2011 7:54 PM
 Forum Newbie Group: General Forum Members Last Login: Monday, April 6, 2015 7:25 PM Points: 6, Visits: 46
 What if i want the other value not the floor value ........... i mean if its 1234.4321 i want 4321 (values after the decimal place...)?Cheers,Chandra
Post #1156494

 Permissions