I’m developing a C++ library with oracle OCI library. I’m loading from a Oracle Database 11g database. Here I need to load large values with decimal places. In this case I need to use long double instead of double. I’m not sure whether OCI supports for long double.
According to the documentation SQLT_FLT is for float and double only. Can someone let me know whether OCI supports for long double and if so how to retrieve them
I’m developing a C++ library with oracle OCI library. I’m loading from a Oracle
Share
Yes and no.
According to the server docs on floats, the ‘native’ C types support up to double precision (
BINARY_DOUBLE). However, the NUMBER type can store:which is more precision than
long doubleon x86/amd64.So, you’d need to use that type instead of
BINARY_*. Sadly, the developer docs say:On the other hand, there are also docs on:
AFAICS OCINumberFromReal() supports
long double; and if you want even more precision, then you could use OCINumberFromText() with decimal string.