I’m frustrated

Group by clause causes error in child view

I have a controller where i have added a command that includes a group by clause. When i attatch the controller with the relevent view to the master or parent and filter from a value from the parent, there is an error.
It doesn't seem to like the "Group by" clause?
Is this a known issue or is there a way aroud it?
1 person has
this problem
+1
Reply
  • jasper,
    What I have realised is that the COT tool does not directly use your controller queries to do it's selects/updates. The point of it , is to tell COT your relationships and where the fields come from, and from that it will build what it thinks is the correct statements.

    Anyway, embedding a group by is surely going to confuse it.

    An alternative is to create a view that has that groupbBy inside it, then COT tool won't see it.

    As an aside, something else useful I found, is that you have an ambigous query, populate the field "Table name" on the controller tab - this tells the COT tool which table to do the updates too in the case it cannot figure it out.
    This helped me when I had an outer join and the primary table was not the first table in the query (COT got confused).

    Pat.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated indifferent, undecided, unconcerned kidding, amused, unsure, silly happy, confident, thankful, excited

  • I’m frustrated
    Thanks Pat.
    That is exactly the way i tried to get around the "Group by" clause - by creating a view (lets say view x) with the group by statement in it. The problem i have is the same one i posted yesterday - i have view x as a child of another view - but now i want to show the individual records attached to the item on the grid of view x when clicking on it - i have another view as a child of view x but nothing happens when i click on the grid of view x?
    I can't get the master/child working for the view.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated indifferent, undecided, unconcerned kidding, amused, unsure, silly happy, confident, thankful, excited

  • If you're happy to send through your project, and your db script I'll have a look.

    It has to be something simple.

    let me know.

    pat.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated indifferent, undecided, unconcerned kidding, amused, unsure, silly happy, confident, thankful, excited

  • Thanks Pat, i have done a workaround, seems very clumsy and a bit of overkill but its working now.

    On insertion of a "detail record" i am creating or updating a master table which in effect groups all the records together.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated indifferent, undecided, unconcerned kidding, amused, unsure, silly happy, confident, thankful, excited