sql - What would be a reliable way to get fractional value from a number? -
I have many types decimal (8, 2) and sub-string to get a partial value. @val = 1580 set @ strv = artist (Valve in the form of @Varchar) @val, for example
for example), @val decimal (8, 2), @stroveworvar (10) Select the substrings (@strew well, chandexx ('.', @troval), lane (@trate wall)) Is just a better way to get virtual value Change from .80 to @val without any character
I'm thinking if there is an underlying UDF (user-defined function) Which is your Roll The version will parse place out.
Use the modulus (%) operator you will find 0.80
Declare @val decimal (8, 2) set @val = 15.80 select @val, @ val% 1
Comments
Post a Comment