KNOWLEDGE BASE

When Using the [Sybase][ODBC Driver][Sybase IQ]Feature, top/first in a subquery, is not supported


Published: 23 Sep 2021
Last Modified Date: 24 Sep 2021

Issue

When connecting to Sybase, the following error might occur:
 
[Sybase][ODBC Driver][Sybase IQ]Feature, TOP/FIRST in a subquery, is not supported.
Unable to properly calculate the domain for the field 'xxx'. Displayed data may be incorrect.

Environment

  • Tableau Desktop
  • Windows Server 
  • Sybase IQ

Resolution

Change the custom sql and do not use 'Top N' in subquery.

Cause

Sybase only supports the 'top N' clause in outer query select statements, not in the 'select' list of a subquery. This differs from Microsoft SQL server. Any attempt to use the 'top N' clause in a subquery yields a syntax error.
Did this article resolve the issue?