1.很明显left_fee列找不到。
2.同上。
3.看括号是不是匹配。

解决方案 »

  1.   

    (select note from (select * from hbbb_bus_info_t where 
    service_id=a.service_id and note is not null) where rownum=1) ---2
    from hbbb_service_relation_t a,hbbb_customer_info_t c where ----3
     先把括号匹配,在看下是否写错字段名。
      

  2.   

    select a.service_id,
    (select name from hbbs_favour_menu_t where kind=a.service_favour_id and service_kind=8) favour_name,
    (select dealer_name from hbbd_dealer_t where dealer_id=a.source_id) source_name,
    c.fax,c.first_name,c.comm_address,b.owe_fee-b.left_fee,
    (select note from hbbb_bus_info_t where service_id=a.service_id and note is not null and rownum<2)
    from hbbb_service_relation_t a,hbbb_customer_info_t c,HBBrpt_USER_OWE_T b
     where a.service_kind=8 and c.customer_id=a.customer_id and a.account_id=b.account_id and exists (select 1 from HBBrpt_USER_OWE_T b where a.account_id=b.account_id and b.owe_fee-b.left_fee>0) ;