Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
AGo
Post Patron
Post Patron

Regional setting for decimal in Odbc.DataSource

Hello,

I'm using Odbc.DataSource() to query a PostgreSQL database, every decimal field is returned without decimal (as an integer), it's easy form me to apply a division by 100, but now I'm querying a lot of fields really. Is there a way maybe to pass a regional parameter/argument to this function to have my values with decimal or the problem could be in the ODBC configuration?

 

Thanks in advance

1 ACCEPTED SOLUTION
v-yingjl
Community Support
Community Support

Hi @AGo ,

Could not reproduce it in my side as far as my test. 

Test Environment: 

PostgreSQL 13 Database; ODBC Driver: postgresql_13_002.zip

1.png

 

You can try to set the data type as numeric in PostgreSQL which is equal to decimal, refer: 8.1. Numeric Types 

vyingjl_0-1636424752933.png

vyingjl_1-1636424776180.png

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Syndicate_Admin
Administrator
Administrator

Hi @AGo ,

Could not reproduce it in my side as far as my test. 

Test Environment: 

PostgreSQL 13 Database; ODBC Driver: postgresql_13_002.zip

1.png

 

You can try to set the data type as numeric in PostgreSQL which is equal to decimal, refer: 8.1. Numeric Types 

vyingjl_0-1636424752933.png

vyingjl_1-1636424776180.png

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

v-yingjl
Community Support
Community Support

Hi @AGo ,

Could not reproduce it in my side as far as my test. 

Test Environment: 

PostgreSQL 13 Database; ODBC Driver: postgresql_13_002.zip

1.png

 

You can try to set the data type as numeric in PostgreSQL which is equal to decimal, refer: 8.1. Numeric Types 

vyingjl_0-1636424752933.png

vyingjl_1-1636424776180.png

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

Top Solution Authors
Top Kudoed Authors