Forum Discussion
Anonymous
5 years agoNot applicable
PostgreSQL Data Source with number in table name not recognized
Hi everyone, I would like to build a Power BI report with a data source that has numbers as their name e.g. 25hourshotel We have a database host selector and a database selector, so that we w...
- 5 years ago
Hi Anonymous
PostgreSQL table names should not start with a number.
If you have to work with tables that do, you can wrap the table name in double quotes
PostgreSQL SQL Syntax and Use | PostgreSQL Naming Rules | InformIT
Try this for your SELECT
"SELECT * from ""25hourshotel.25hourshotel.overview"""Regards
Phil
PhilipTreacy
Super User
5 years agoHi Anonymous
PostgreSQL table names should not start with a number.
If you have to work with tables that do, you can wrap the table name in double quotes
PostgreSQL SQL Syntax and Use | PostgreSQL Naming Rules | InformIT
Try this for your SELECT
"SELECT * from ""25hourshotel.25hourshotel.overview"""
Regards
Phil
Anonymous
5 years agoNot applicable
Hi Phil,
unfortunately I didn't create the data source and had to work with the number in the name. Anyway, I tried the double and triple quotes and they solved my problem, thanks!