joeythelips
IS-IT--Management
Hi,
I want to update a field in an oracle table.
My formula is
-divide field value by .787564.
-round resulting amount to 2 decimal places.
-round down where the third figure after the decimal point is 4 or lower, round up where it is 5 or higher.
I can do the first 2 parts no probs, but do i need to add extra sql to the final part to round up or round down? Or does Oracle automatically work that out? This is the code i' have so far:
UPDATE MyTable set
MyTable.TotalCash1 = round(MyTable.TotalCash1 /1.27, 2)
MyTable.CurrencyType ='EURO'
WHERE MyTable.CurrencyType = 'IRP';
I want to update a field in an oracle table.
My formula is
-divide field value by .787564.
-round resulting amount to 2 decimal places.
-round down where the third figure after the decimal point is 4 or lower, round up where it is 5 or higher.
I can do the first 2 parts no probs, but do i need to add extra sql to the final part to round up or round down? Or does Oracle automatically work that out? This is the code i' have so far:
UPDATE MyTable set
MyTable.TotalCash1 = round(MyTable.TotalCash1 /1.27, 2)
MyTable.CurrencyType ='EURO'
WHERE MyTable.CurrencyType = 'IRP';