Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

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

Andris Perkons-Oracle

Are you sure you are talking about SQLcl? On the oracle website, I see version 18.3, not 10.3.

Andris

sect55

My typing error. It is 18.3 not 10.3. I corrected it.

Andris Perkons-Oracle

How large is your downloaded file? Does it match the size (21120590 bytes) and the md5 sum (7550bdbc481c4603b41096d95fa89e3f)?

sect55

It says 5K

cl size.jpg

Glen Conway

Just downloaded the sqlcl-18.3.0.259.2029.zip. For me it is:

Capture.JPG

Try again?

sect55

I just tried again in Windows and I am getting the same error. I never had this problem before. It is only 5KB and has not files in it. I cannot extract it. It says the folder is empty.

Andris Perkons-Oracle

Try downloading from another system and/or from another location. It looks like something is preventing you to download files from the internet.

1 - 7

Post Details

Added on Jun 12 2021
2 comments
1,008 views