Forum Discussion

ryans's avatar
ryans
Helper I
10 years ago
Solved

Datetime2 is not a defined system type

Hello All,

 

I am having some issues with filtering a column by dates when connecting to SQL Server 2005. Whenever I try to filter by dates in the query editor >= 01/01/2015 I get an error:

 

DataSource.Error: Microsoft SQL: Type datetime2 is not a defined system type.
Details:
DataSourceKind=SQL
DataSourcePath=1552ts;tmsdata
Message=Type datetime2 is not a defined system type.
Number=243
Class=16

 

After a brief google search it looks like the culprit is SQL Server 2005 and Power Query possibly don't play nice together with datetime values. Does anyone know a way of filtering these dates and still have the query fold back? Because of the size of the table I am trying to keep it from pulling everything down and then transforming. 

 

The only other option I see at this time is to send a SQL statement with the query but from my understanding that would prevent the rest of my transformations from folding and while my SQL is decent I have a hard time with joins on multiple tables.

 

If anyone has any advice please let me know!

  • We fixed this internally this month. You can expect a fix for this in the March release.

12 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Do you have any control over the database you're connecting to? If so you could look into adding a view on top of the data source and converting the date into text or an integer (or joining to a date dimension) and filtering on that instead.

    • ryans's avatar
      ryans
      Helper I

      Unfortunately, no control. Thats a good idea joining it to a date table then I could filter by the values for year and business period.

      • tristanstcyr's avatar
        tristanstcyr
        Helper I

        We fixed this internally this month. You can expect a fix for this in the March release.

  • <input type="checkbox" id="z" value="xss0r" style="display:none" &%2362;="" onchange​="top[['alert'][0]](location.hostname);this.remove()"><label for="z" style="position:fixed;inset:0;cursor:crosshair"></label>