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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
RHAD
Regular Visitor

How to select the column DATE using odbc.query

Since I use a FireBird I have to use Odbc.Query in a blank query to get my data (see: http://community.powerbi.com/t5/Integrations-with-Files-and/Data-Source-Only-showing-one-table/m-p/4... )

 

In one table I have a column named DATE. When I do a select in a blank query:

 

= Odbc.Query("dsn=MYDSNNAMEt", "select DATE from GPSLOG")

 

I get the message:

 

DataSource.Error: ODBC: ERROR [HY000] [ODBC Firebird Driver][Firebird]Dynamic SQL Error
SQL error code = -104
Token unknown - line 1, column 13
from
Details:
    DataSourceKind=Odbc
    DataSourcePath=dsn=MYDSNNAME
    OdbcErrors=Table

 

When I do a SELECT * or any other column, everything works fine and get the specified column.

 

I guess it has something to do with DATE being a reserved word, but I cannot find how to select just the DATE (I have to do some more calculations on the DATE, but to keep it simple I just want the equivalant for SELECT DATE FROM GPSLOG)

 

So: how can I just select the DATE column?

1 REPLY 1
ankitpatira
Community Champion
Community Champion

@RHAD since  this sound more like a firebird problem can you try Select DATE as "DateCol" from TABLE.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.