update IP_23_Fees_detail set invalid=ip.totalcost*(1-me.validRateIP)
from IP_23_Fees_detail ip join chargeItem_ExtendedProperty me on ip.charge_id=me.charge_id
where me.insurancetype='N' and me.region_id=23 and ip.ip_code='001120211'   and ip.running_number='1' and ip.chargeitem_type not in (6,7,8,9)
怎么把该SQlServer脚本改成oracle脚本????

解决方案 »

  1.   

    update IP_23_Fees_detail
       set invalid =
           (select ip.totalcost * (1 - me.validRateIP)
              from IP_23_Fees_detail ip
              join chargeItem_ExtendedProperty me
                on ip.charge_id = me.charge_id
             where ip.ip_code = '001120211'
               and ip.running_number = '1'
               and ip.chargeitem_type not in (6, 7, 8, 9))
     where me.insurancetype = 'N'
       and me.region_id = 23
      

  2.   


    写错了,这样看是否可以:
    update IP_23_Fees_detail ip
       set invalid = ip.totalcost *
                     (1 - (select me.validRateIP
                             from chargeItem_ExtendedProperty me
                            where ip.charge_id = me.charge_id
                              and me.insurancetype = 'N'
                              and me.region_id = 23))
     where ip.ip_code = '001120211'
       and ip.running_number = '1'
       and ip.chargeitem_type not in (6, 7, 8, 9)