Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-24

Correlated reference in aggregate function of subquery not supported by all data sources

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Optional Optional
    • 9.x
    • 9.x
    • JDBC Connector
    • None

      Defect Tracker #10437: The below BQT query fails for Sybase or SQL Server because of the correlated reference inside the aggregate function, but works in Oracle or if processed by our own system. Seems like connector capabilities need to handle this but they aren't fine-grained enough currently.

      SELECT
      sa.intkey, sa.stringkey, sa.datevalue, sa.floatnum, sa.doublenum, sa.datevalue, sa.charvalue, sa.shortvalue, sa.objectvalue
      FROM
      bqt1.smalla AS sa
      WHERE
      sa.datevalue = (SELECT MAX(sb.datevalue) FROM bqt1.smalla AS sb WHERE (sb.intkey = sa.intkey) AND (sa.stringkey = sb.stringkey) )

            Unassigned Unassigned
            rhn-engineering-shawkins Steven Hawkins
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: