cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cerequena
New Member

Using custom SQL via ODBC throws errors

We are trying to use custom SQL as a data source against PostgreSQL, using the latest, official ANSI and Unicode PostgreSQL drivers for Windows.
We are unable to customize the SQL  statement beyond "Select * from table" - anything else throws ODBC errors.
Does anyone know of potential solutions?

1 ACCEPTED SOLUTION
cerequena
New Member

I discovered that PosgreSQL requires double quotes around all column names to avoid errors.

This solves the issues. Thank you.

View solution in original post

2 REPLIES 2
cerequena
New Member

I discovered that PosgreSQL requires double quotes around all column names to avoid errors.

This solves the issues. Thank you.

View solution in original post

V-pazhen-msft
Community Support
Community Support

@cerequena 

 

What is the error message? You can try find similar discussions for that specific error message. They usually have fixes in the replies.

 

e.g.
Solved: Getting Data from ODBC using SQL statement - Microsoft Power BI Community

PostgreSQL Major: "OLE DB or ODBC error: [Expression.Error] We couldn't fold the expression to the d...

 

 

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Kudoed Authors