Split integer valuefrom decimal valye

 Author Message vchandm23 SSC Veteran Group: General Forum Members Points: 212 Visits: 46 i know i can do the floor() on a decimal number and then store that to a variable and subtract it from the original numberexample @a = 2.75@b = floor(2.75)@c = @a - @b (this gives me 0.75)but is there a function that does this in SQL ServerCheers,Chandra vchandm23 SSC Veteran Group: General Forum Members Points: 212 Visits: 46 i know i can do the floor() on a decimal number and then store that to a variable and subtract it from the original numberexample @a = 2.75@b = floor(2.75)@c = @a - @b (this gives me 0.75)but is there a function that does this in SQL ServerCheers,Chandra Bruce W Cassidy SSCertifiable Group: General Forum Members Points: 7063 Visits: 1033 If you can't use convert(), you can always use cast(). BTW, I can't remember how floor() behaves for negative numbers, but I know there's a reason I end up using round() instead. Jeff Moden SSC Guru Group: General Forum Members Points: 506043 Visits: 44261 vchandm23 (8/8/2011)but is there a function that does this in SQL ServerNot in any version of SQL Server that I know of. You're pretty much stuck with doing the math like you did. --Jeff ModenRBAR 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.If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair Helpful Links:How to post code problemsHow to post performance problemsForum FAQs krs Valued Member Group: General Forum Members Points: 55 Visits: 185 vchandm23:What about using modulus (%)? Like some flavor of the following:select replace(1234.4321 % 1 ,'0.','')