how can i group rows

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • akansha1234
    New Member
    • Aug 2008
    • 2

    how can i group rows

    hi friends,
    I am new to teh community as well as to coding in java.
    and now i am facing a problem i hope any one can help me out.

    My problem is that i have some rows i want to group the rows by a particular coloumn name. say i have 5 rows in the table with coloumns like
    Name class Subject Number
    _______________ _______________ ______
    sum of marks
    Now i want to group the students with same name and then sum the number of marks the person got in all the subjects this sum is to be calculated in the jsp only and the logic of display and grouping the rows also should be in jsp.


    Please help me with a solution !!!!
  • Dököll
    Recognized Expert Top Contributor
    • Nov 2006
    • 2379

    #2
    Greetings Dear Friend!

    Can you add a snipet of your work, just for a closer look? Might be necessaru to see how far you are into Java to help, as they may very many ways to handle tha task.

    Do a quick search also above, there may ahve been something already posted that meets/fits your purpose.

    In a bit!

    Comment

    • JosAH
      Recognized Expert MVP
      • Mar 2007
      • 11453

      #3
      This is not a Java question but a SQL question; a 'GROUP BY' clause should
      do (part of) the trick.

      kind regards,

      Jos

      Comment

      Working...