Answer the question
In order to leave comments, you need to log in
Convert NUMBER to otl types: how?
When executing a SELECT in otl4 (OCI/Oracle 11 environment) and trying to get the types of the returned data via describe_select, otl describes the fields of the NUMBER type base in otl_column_desc.otl_var_dbtype as otl_var_double (in this case, the value of otl_column_desc.prec == 0 and otl_column_desc.scale == 129, the meaning of which eludes me...)
It turns out uncertainty: both fields that obviously do not have a fractional part (ID of the NUMBER type) and fields that can potentially contain a fractional part (AMOUNT of the NUMBER type) are represented as a double.
What would be the most correct, and with the least overhead, to distinguish between these two cases? Those. if I counted double v from the stream, what to write in CheckInt (v) in order for the code to work correctly
if (CheckInt(v))
printf("%.0f", v);
else
printf("%.2f, v);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question