select fwpl.tfcid,sum(lips.grswt) from likp,lips,fwpl,[view] where
likp.vbeln=lips.vbeln and
likp.mawb=fwpl.mawb and
likp.hawb=fwpl.hawb and
fwpl.tfcid=[view].tfcid

解决方案 »

  1.   

    select fwpl.tfcid,sum(lips.grswt) from likp,lips,fwpl,[view] where
    likp.vbeln=lips.vbeln and
    likp.mawb=fwpl.mawb and
    likp.hawb=fwpl.hawb and
    fwpl.tfcid=[view].tfcid group by fwpl.ftcid
      

  2.   

    select fwpl.tfcid,sum(lips.grswt) from likp,lips,fwpl,[view] where
    likp.vbeln=lips.vbeln and
    likp.mawb=fwpl.mawb and
    likp.hawb=fwpl.hawb and
    fwpl.tfcid=[view].tfcid group by fwpl.ftcid
      

  3.   

    这里view是个试图,[view]大力这样写什么意思?再有如果涉及试图,能不能重复查询?比如:
    select a,(select b from A,view where...)as b
    from view 

    select a,(select b from A where...)as b
    from view  结果有什么差别?
      

  4.   

    再有如果涉及试图,能不能重复查询? 不能 两个不一样。第一个sum列结果会都一样。
      

  5.   

    bringmail(心口不一@拿来主义) 这里的,[view]不是视图。用[]括起来,表示是一个变量名,而不是关键字!