LimitClauseKind.AnsiSql2008 (4) is an enumeration that describes the type of limit clause supported by the SQL dialect used by this data source. It is a member of the LimitClauseKind.Type and specifies that this SQL dialect supports an ANSI SQL-compatible LIMIT N ROWS specifier to limit the number of rows returned.
The Odbc.DataSource function lets you connect to various data sources. Within this function, there’s a parameter named
SqlCapabilities. This parameter can be used to specify certain capabilities or modifications to the SQL query being executed.
One of the options you can set within
SqlCapabilities is the
LimitClauseKind. This kind hasn’t been widely documented.
Here’s a simple example to illustrate the use of LimitClauseKind.AnsiSql2008:
Odbc.DataSource( "dsn = your_dsn", [ HierarchicalNavigation = true, SqlCapabilities = [ LimitClauseKind=LimitClauseKind.AnsiSql2008 ] ] )
By setting the
AnsiSql2008, you’re aligning your query with the ANSI SQL 2008 standard.
Generally this is done through the user-interface using the navigation pop-up screen that appears when selecting Odbc.DataSource as method to connect.
Learn more about LimitClauseKind.AnsiSql2008 in the following articles:
- ODBC Data Sources, The SqlCapabilities Option And Power Query/Power BI Data Refresh Performance
The article highlights the impact of the “Supported row reduction clauses” option in Power Query for ODBC data sources on data refresh performance and the efficiency of the Power Query Editor. » Read more
Other related enumerations are:
Here’s a list of functions that work with LimitClauseKind.Type: