Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback, please email oracle-forums_moderators_us@oracle.com

How to get the same value of NUMBER type in Oracle db when cursor.fetchall() is called

User_4YI8UJun 12 2021

Hi,
In my Oracle 19c database, I have a table with many columns of type NUMBER and they store the values like for example 100, 0, 250 etc. However, when SQL Query is executed using cx_Oracle python module (v8.2.1), the cursor.fetchall() method is returning the values of those NUMBER type columns as 100.0, 0.0, 250.0 (with single decimal point). As a result our automation test results comparison is failing.
Could you please suggest/guide me on how to get the exact value of those NUMBER type columns in the same way how Oracle db stored without that additional decimal value (dot zero). Please let me know if you need any additional information on the issue.

Regards,
Chandrasekhar

Comments
Post Details
Added on Jun 12 2021
2 comments
378 views