2013-07-27 76 views
0

我想將concat值更新爲單個列。請幫我更新這個。將concat值更新爲單個列

update tbl_data1 
    set FLD_REMARKS= 
     (select i.fld_id||':'||i.fld_calc_id||':'||0||':'||0 
      from tbl_cust_order p, tbl_cust_bill i 
     where i.fld_item_id=p.fld_id 
      and p.fld_item_id=110 
      and rownum =1 
     order by p.fld_id desc) 
where fld_id=243078 

回答

0

你不說是什麼問題,但也許這將幫助:

update tbl_data1 
    set FLD_REMARKS= 
    (select TheFld FROM (
     (select i.fld_id||':'||i.fld_calc_id||':'||0||':'||0 TheFld 
      , ROW_NUMBER() OVER (ORDER BY p.fld_id desc) rn 
      from tbl_cust_order p, tbl_cust_bill i 
     where i.fld_item_id=p.fld_id 
      and p.fld_item_id=110) 
     WHERE rn = 1) 
where fld_id=243078