I would just get the whole value and then get the remainder:
decimal total = ;
decimal fraction = decimal.Remainder(total, 1m);
(Perhaps a more efficient way to get the rest, but it's pretty simple.)
While you can do this in SQL, it might work if you want to get values ββfrom LINQ to SQL or something like that - I prefer to manipulate the value in .NET code rather than in SQL if it does not affect results or performance.
source
share