• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

group by query

 
Rd Dari
Ranch Hand
Posts: 212
Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have a jsp page in that I am getting data from two tables and want to particular data which I am select but group by query in not working properly



please suggest me in the right way


Thanks in advanced
 
Harsha Gedala
Ranch Hand
Posts: 41
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Query is wrong. You should use all the selected columns in the group by operation to get the result. For better understanding whether the query is working or not, please run the query in DB then try to implement it in JSP.
 
Rd Dari
Ranch Hand
Posts: 212
Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


its not wrking .........



wht is wrong in this query..........
 
Harsha Gedala
Ranch Hand
Posts: 41
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
appartment.society_name=society.society_name='"+resi_society+"'


I guess you are new to DML sql statements. Here you go this should work. you cannot reassign something like above.


 
Mike Zal
Ranch Hand
Posts: 144
Fedora Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What exactly are you trying to do with the query? From the looks of it, there is no reason to use a GROUP BY clause since you are not performing any aggregate function in the query. I think you might want to use an ORDER BY clause instead.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic