Bishnu Prasad
Bishnu Prasad

Reputation: 97

Need to get a value till precision of 15 digit after decimal in DB2 Query

One of DB2 table column value is appearing as 0.3901369869709015 and we need to compare this value against my expected value as 0.390136986970901. I tried to get the value from DB2 by using Decimal/Dec method. With that the value is getting round off and appearing as 0.390136986970902. Could you please help me to correct the below query that i am using to extract data from my DB2 table.

SELECT DECIMAL(UV_FIELDSCOREMAP,15,15) AS UV_FIELDSCOREMAP From cvsinst.uv_occ WHERE CASEID = '20170720'

Upvotes: 0

Views: 212

Answers (1)

Mark Barinstein
Mark Barinstein

Reputation: 12339

Use TRUNCATE(UV_FIELDSCOREMAP, 15) instead.

Upvotes: 2

Related Questions