由于复杂的原因,我需要这样做
.check:before {
display: block;
width: 100px;
height: 100px;
background: red;
content:'';
}
input:checked ~ .check:before {
content:'Content';
}
这给了我1,000,000.0000
但是如何将它从varchar恢复到十进制(12,4)以后呢?
谢谢!
答案 0 :(得分:0)
只需删除逗号并转换即可。所以:
DECLARE @x varchar(255);
SELECT @x = FORMAT(CAST(ROUND(column) AS INT), '#,0.0000');
SELECT CAST(REPLACE(@x, ',', ..) as DECIMAL(12, 4));