本帖最后由 sl271446169 于 2014-10-29 20:45:07 编辑

解决方案 »

  1.   

    大侠,全行都相同才能合并,两行不同的合并了,不同的值取哪个?若是合并想同行,使用distinct,比如你的sql这样:
    select distinct(a.id),a.*, b.taname, c.tstname,e.deadname,d.tombdate,
    row_number() over (order by a.tid, a.taline, a.taposi ) as RN from 
    t_tomb a  , t_tomb_area b, t_pmt_tomb_status c , t_tomb_dead_use d ,t_dead e
    where a.taid = b.taid and a.tstid = c.tstid and d.tid = a.tid and d.deadid = e.deadid