on 04-07-2016 9:11 AM
Hi, Experts
env
====
Sybase IQ 15.4
[query1]
select convert(numeric(18,1), 0.8488*100) from iq_dummy;
84.8
[query2]
select convert(numeric(18,1), 0.8488*100);
84.9
why are return values different ?
one is 84.8 the other is 84.9....??
thanks in advance...
Hi,
In IQ database applications, always use "from iq_dummy" when user table is not required (case of SQL functions).
Otherwise, the query would be handled by Sql Anwyhere Engine, and then result could be different:
So, here rely to 1st query/result. 84.8.
How IQ converts numeric (or decimal) values to a lower precision/scale?
Answer:
Rounded or Truncated Results - SAP IQ Load Management - SAP Library
"Whenever SAP Sybase IQ requires an explicit or implicit conversion from one data type to another during a query or insert, it always truncates the results."
Hope this helps.
Regards, Tayeb.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.