在我的lists表中字段item_no 中的值是一定的。而对应的sub_item字段则有7个不同的值!
我现在要将这7个值合并起来!
“U600188728/00A,U600188735/00A,U600188744/00A…… ”请问各位我该怎么办!
我用的数据库是oracle8,sys_connect_by_path()此方法没用!
 希望熟悉oracle8的老师傅们!帮帮忙!磕头拜谢了!

解决方案 »

  1.   

    csdn怎么还插入不来自己剪切的图片阿  还是我不会用……
    tablename--> listsselect item_no,sub_item from lists where itemno='S600197149/00A'
    结果:item_no           sub_item
    S600197149/00A    U600188728/00A 
    S600197149/00A    U600188735/00A
    S600197149/00A    U600188744/00A谢谢各位了  请帮帮忙
      

  2.   

    http://blog.csdn.net/you_tube/archive/2009/04/10/4059251.aspx
    参考下,8I,9I,10G
      

  3.   

    for  rec in (select * from t1 where id=:P_item_no)
     str:=str||rec.sub_item||',';
     end loop;
     str:=substr(str,1,length(str)-1)
      

  4.   

    for  rec in (select * from t1 where id=:P_item_no) loop
    str:=str||rec.sub_item||','; 
    end loop; 
    str:=substr(str,1,length(str)-1)