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

use of direct column name rather than alias make aggregation fail (Hibernate depends on that)

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.1.1.0, 10.1.3.1
    • Fix Version/s: 10.3.1.4
    • Component/s: SQL
    • Labels:
      None

      Description

      Error: org.apache.derby.client.am.SqlException: Column 'MODEL0_.COL_0_0_' is either not in any table in the FROM list or appears within a join specification and is outside the scope of the join specification or appears in a HAVING clause and is not in the GROUP BY list. If this is a CREATE or ALTER TABLE statement then 'MODEL0_.COL_0_0_' is not a column in the target table., SQL State: 42X04, Error Code: -1

      for

      select
      model0_.balance as col_0_0_,
      count as col_1_0_
      from
      account model0_
      group by
      model0_.balance
      having
      count > 1

        Attachments

        1. 1624_repro.sql
          2 kB
          Samuel Andrew McIntyre

          Issue Links

            Activity

              People

              • Assignee:
                mkhettry Manish Khettry
                Reporter:
                epbernard Emmanuel Bernard
              • Votes:
                3 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: