拆分再group by 
http://topic.csdn.net/u/20080612/22/c850499f-bce3-4877-82d5-af2357857872.html

解决方案 »

  1.   

    用程序拆分吧,这个运算对于 SQL 来说,太过复杂了,还是程序处理比较好
      

  2.   

    http://topic.csdn.net/u/20080612/22/c850499f-bce3-4877-82d5-af2357857872.html
      

  3.   

    select d ,count(1) as cnt 
    from ( 
    select keyvalue,ltrim(Mid (keyvalue,b.id,instr(mid(keyvalue,b.id+1,len(keyvalue) -b.id)+' ¦',' ¦'))) as d 
    from ta a,tb b 
    where Mid (' ¦'+keyvalue,b.id,1)=' ¦' 

    where d like '%电%' 
    group by d 能否详细解释一下这段代码的含义啊? 谢谢了