我想在报告中显示小数2后的值,但如果值满足该条件则需要显示完整值。公式如下,但给出错误
if trim({As400InTemp.PARTYCODE})='006883' then
{As400InTemp.SPPRIC}
else
round({As400InTemp.SPPRIC},2)
答案 0 :(得分:0)
你可以像这样使用MID:
“33.09789”
<table>
<thead>
<tr>
<th>S.N.</th>
<th>Name</th>
<th>Address</th>
<th>Modified Date</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
$sn = 1;
while($result= mysql_fetch_row($res))
{
?>
<tr id=<?= $result[0];?>>
<td><? echo $sn++; ?></td>
<td><? echo $result[1] ?></td>
<td><? echo $result[2] ?></td>
<td><? echo $result[3] ?></td>
<td>
<a href="#" id="delete">Delete</a>
<a href="#" id="edit">Edit</a>
</td>
</tr>
<?php } ?>
</tbody>
</table>
$('#delete').on('click', function(e) {
e.preventDefault();
var id = $(this).closest('tr').attr('id');
$(this).closest('tr').remove();
});
或
MID({yourstringhere}, 4)
它将返回值09789;