Reputation: 5213
I am doing an assignment for a course and have a table of sales which contains a field for paid_amt as double (to reduce confusion from dealing with money in cents).
The problem is that when I do a command:
select paid_amt from sales
it displays
PAID_AMT
------------------------
+2.00000000000000E+002
+3.33000000000000E+002
I want it to display
PAID_AMT
------------------------
200
333
instead.
How would I do this?
Thanks ahead of time!
Upvotes: 0
Views: 473
Reputation: 69574
For db2
SELECT INTEGER(paid_amt)
from sales
For Sql
SELECT CAST(paid_amt AS INT)
from sales
Upvotes: 1