【正文】
select sysdate into v_date from dual。create or replace procedure p_tom_8 isv_user_name varchar2(8)。501400295639。出錯(cuò)語(yǔ)句處理: 存儲(chǔ)過(guò)程變量定義 v_user_name varchar2(8)。 group by user_no ) t group by user_no having sum(should_money) sum(fact_money) sum(owe_money)having abs(sum(should_money) sum(fact_money) sum(owe_money)) 編寫(xiě)存儲(chǔ)過(guò)程,要求存儲(chǔ)過(guò)程體內(nèi)有兩個(gè)子begin end ,第一個(gè)begin end沒(méi)有exception處理,第二個(gè)、存儲(chǔ)過(guò)程主體有exception(分別輸出”err2!”,“err0!”。 and business_place_code = 39。 group by user_no union all select user_no,0 should_money,0 fact_money,sum(owe_money) owe_money from sf_arrearage where mon = 200802 and user_no =39。 and business_place_code = 39。 group by user_no union all select user_no,0 should_money,sum(fact_money) fact_money,0 owe_money from sf_charge_record where mon = 200802 and user_no =39。 and business_place_code = 39。試著找出計(jì)量點(diǎn)庫(kù)表中有,而表位置沒(méi)有的用戶(hù)、計(jì)量點(diǎn)信息(反過(guò)來(lái)找出表位置庫(kù)表有,而計(jì)量點(diǎn)庫(kù)表沒(méi)有的用戶(hù)、計(jì)量點(diǎn)信息)(用兩種方法: (+) ,not exists )select a.*,b.* from cim_agreement a,cim_meter_position bwhere = (+) and = (+)and is nullselect a.* from cim_agreement awhere not exists (select 1 from cim_meter_position b where = and = ) 電費(fèi)有個(gè)規(guī)則:按戶(hù)匯總:應(yīng)收實(shí)收=欠費(fèi),應(yīng)收為df_money_files的should_money,實(shí)收為sf_charge_record的fact_money,欠費(fèi)為sf_arrearage的owe_money,試找出mon=200802月份,business_p