Home Forums Scheme Error Using "Count" in a Read

This topic contains 2 replies, has 2 voices, and was last updated by Louis Pace Louis Pace 2 months, 3 weeks ago.

  • Author
    Posts
  • #9640
    Louis Pace
    Louis Pace
    Participant

    The following code successfully finds tasks that are not associated with any agencies:

    This, however, does not work:

    The “act” attribute of TaskEntity is a task. The error is “ORA-00934: group function is not allowed here”. The generated SQL is:

    I’m assuming this is a bug? Only the A and B aliases are declared. Where did the D in the count come from? A and B join the TaskEntity table with the Act table (where tasks are stored), but agencies don’t seem to be referenced. What is going wrong, and is there some other way to read from the TaskEntity level?

    Thanks for your help!

    0
  • #9674
    Steve
    Steve
    Participant

    That is indeed a bug.  You can probably work around it by using the “any” function, e.g.
    (TaskEntity’read ‘() `(not (any (@ act agencies))) ‘() ‘() ‘() ‘())

     

     

    0
    • #9683
      Louis Pace
      Louis Pace
      Participant

      Thanks, Steve. The “any” trick appears to work. Is there anything I need to do to report this bug, or does this forum post suffice?

      0

You must be logged in to reply to this topic.