F ftop1 Unregistered / Unconfirmed GUEST, unregistred user! 2009-09-25 #1 表明 STA 字段 fJE 为浮点型fJE = 10.1564fJE = 10.1500........怎用用一条 SQL 把 fJE 字段的值 只保留 2位小数 小数后 3 位后变为 0fJE = 10.1500fJE = 10.1500
表明 STA 字段 fJE 为浮点型fJE = 10.1564fJE = 10.1500........怎用用一条 SQL 把 fJE 字段的值 只保留 2位小数 小数后 3 位后变为 0fJE = 10.1500fJE = 10.1500
D de410 Unregistered / Unconfirmed GUEST, unregistred user! 2009-09-25 #2 给你一个示例看一下:SELECT LEFT(CAST(1.7455 AS varchar(50)), CHARINDEX('.', CAST(1.7455 AS varchar(50))) + 2) as A结果为1.74自己再设一下小数位数~
给你一个示例看一下:SELECT LEFT(CAST(1.7455 AS varchar(50)), CHARINDEX('.', CAST(1.7455 AS varchar(50))) + 2) as A结果为1.74自己再设一下小数位数~
W willing66 Unregistered / Unconfirmed GUEST, unregistred user! 2009-09-25 #3 UPDATE STA SET fJE = round(fJE - 0.005, 2)
M machoo Unregistered / Unconfirmed GUEST, unregistred user! 2009-09-25 #4 select round(fJE,2) from STA
Z zaorv Unregistered / Unconfirmed GUEST, unregistred user! 2009-09-26 #5 select floor(10.5260*100)/100 结果:10.520000
A ArJianzeng Unregistered / Unconfirmed GUEST, unregistred user! 2009-09-29 #7 可以試看看:cast();先轉為varchar(), 再轉為decimal()