Guest_imported
New member
- Jan 1, 1970
- 0
Hi
amount1 is character(18)
amount2 is numeric
I cannot redefine their data types.
When the multiplication takes place, we get 27397.416.
When the division takes place, we get 2.73.
How can I round up to 2.74 when greater than 2.73500000 ?
select "amount1"=amount1,
"amount2"=amount2,
"computamount"=ltrim(convert(char(20),convert(numeric(17,2), convert(numeric(13,6), amount1) * amount2 / 10000 )))
from etc etc
amount1 amount2 computamount
------------------ ----------------- -------------
00000000000.184000 148899 2.73
Thanks in advance
amount1 is character(18)
amount2 is numeric
I cannot redefine their data types.
When the multiplication takes place, we get 27397.416.
When the division takes place, we get 2.73.
How can I round up to 2.74 when greater than 2.73500000 ?
select "amount1"=amount1,
"amount2"=amount2,
"computamount"=ltrim(convert(char(20),convert(numeric(17,2), convert(numeric(13,6), amount1) * amount2 / 10000 )))
from etc etc
amount1 amount2 computamount
------------------ ----------------- -------------
00000000000.184000 148899 2.73
Thanks in advance