Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-2457

Use of column aliases in group by / having clauses can cause queries to fail

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 10.3.1.4
    • Fix Version/s: None
    • Component/s: SQL
    • Labels:
      None

      Description

      Some use of column aliases in group by / having clauses can cause queries to fail with error 42X04. The queries can sometimes be made to work by also aliasing the table or rewriting the query to use a subselect. Attached is a simple sql script which reproduces the issue, originally found as part of DERBY-1624.

        Attachments

        1. 1624_repro.sql
          2 kB
          Samuel Andrew McIntyre
        2. additionalTests.diff
          6 kB
          Bryan Pendleton

          Issue Links

            Activity

              People

              • Assignee:
                bryanpendleton Bryan Pendleton
                Reporter:
                fuzzylogic Samuel Andrew McIntyre
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: