on 2016 Sep 26 2:53 PM
Hello,
General question about query action block... Can we influence number of decimals returned ?
For example, if we run this query (Oracle, but same with Hana for example):
select (8/3) as third from dual
It will give me : 2.666666666667
So 12 decimals precision, where if I run in SQL dev, I have much much more precision...
Is this a JDBC limitation/setting ?
For some of our process, 12 digits precision is not enough...
Thanks
Request clarification before answering.
Did you try to use the "CAST()" function to tell the database it's a NUMERIC and also specify the precision in the SQL request? Seems the above it a bit arbitrary on the datatype of the value being returned as it's not selecting from a column.
Sam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your reply Sam, we tried, but this didn't really helped...
We were using such construction in some queries to do computation on time fields, using fractions to add hours, minutes or seconds. This is fine in Oracle, but Hana is using integer value...
So in fact, we need to change our queries to now use also integer and also adapt our java code(WDP) processing the result...
For example :
In Oracle
select '0001-01-01 00:00:00' + 0.5625 from dual ;
Result: 0001-01-01 13:30:00'
In HANA we have the same action as:
select add_seconds('0001-01-01 00:00:00', 48600) from dummy;
Result: 0001-01-01 13:30:00'
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.