0

Hi all Experts , I am converting my application from Oracle database to Mysql , i am facing alot of problems, some experts are really helping me , i am thankfull to all those how helping people like me. They actually encouraging us to do more n more. Thanks all Again.

Today i got Error: Invalid use of group function
Even when i run :

select IFNULL(max(count(dis_rowno)),0) as maxcolspan from xyz

Any expert Help me.

strSql =select IFNULL(max(count(dis_rowno)),0) as maxcolspan from ictm_fishbone_detail where proj_id='" & proj_id & "' and dis_rowno<>0 and dis_wing in(select dis_wing from ictm_fishbone_master where proj_id='" & proj_id & "' and dis_wing<>0 and wing_id='U') group by dis_wing "
     cmd=new oledbcommand(strsql,dbconn)
      dr=cmd.executereader()
      if dr.read() then
      maxcolspan=dr("maxcolspan")
2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by jbisono
0

I think you are missing to select another field "dis_wing"

select IFNULL(max(count(dis_rowno)),0) as maxcolspan, dis_wing from xyz

Try that and let me know...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.