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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It 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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors