UOM Convertion Rate API

计量单位转换API

set serveroutput on;
Declare
v_Rate Number(30,23);
v_itemid  number default  2036;
Begin
v_rate := INV_CONVERT.INV_UM_CONVERT (
                                   ITEM_ID         => v_itemid,
                                   PRECISION       => 10,
                                   FROM_QUANTITY   => 1,
                                   FROM_UNIT       => '米',
                                   TO_UNIT         => '吨',
                                   FROM_NAME       => NULL,
                                   TO_NAME         => NULL
                                );
dbms_output.put_line('Rate :' ||v_rate);
end;

计算结果表示: 1 米(From_Unit) = Rate * 吨(To_Unit)

Precision为转换率的小数位精度。

你可能感兴趣的:(UOM Convertion Rate API)