本帖最后由 lolly_yang 于 2009-07-22 11:03:11 编辑

解决方案 »

  1.   

    select  'A',temp1.ID,temp2.A_QTY  ,temp3.B_ID  ,temp4.B_QTY  ,temp5.C_ID  temp6.C_QTY 
    from (
    select rowid,ID 
    from xxx
    where ID is not null
    group by ID) temp1,
    (
    select rowid,A_QTY   
    from xxx
    where A_QTY   is not null
    group by A_QTY  ) temp2,
    (
    select rowid,B_ID  
    from xxx
    where B_ID  is not null
    group by B_ID  ) temp3,
    (
    select rowid,B_QTY  
    from xxx
    where B_QTY  is not null
    group by B_QTY  ) temp4,
    (
    select rowid,C_ID  
    from xxx
    where C_ID  is not null
    group by C_ID  ) temp5,
    (
    select rowid,C_QTY   
    from xxx
    where C_QTY   is not null
    group by C_QTY  ) temp6
    where temp5.rowid=temp1.rowid(+) and 
     temp5.rowid=temp2.rowid(+) and 
     temp5.rowid=temp3.rowid(+) and 
     temp5.rowid=temp4.rowid(+) and 
     temp5.rowid=temp5.rowid(+) 
      

  2.   

    如果表XXX已经是经过处理后得到的结果是一个VIEW,好像就不可以用ROWID了,不过还是非常感谢
      

  3.   

    引用 4 楼 sun1976 的回复:如果表XXX已经是经过处理后得到的结果是一个VIEW,好像就不可以用ROWID了,不过还是非常感谢
    好久没用oracle了,ROWID可能是rownumber,总之就是生成行号那个,记不清楚了,你自己试一下吧