2020-04-26 記錄存儲過程編譯報錯

CREATE OR REPLACE PROCEDURE insertInventory(

operator_code varchar2,

operator_name varchar2,

org_code varchar2,

org_name varchar2,

company_code? varchar2,

warehouse_code varchar2,

goods_Codestr1? varchar2,

goods_Codestr10 varchar2)

IS

? ? ? ? cnt number(11);

BEGIN

? ? ? ? select count(view_id) into cnt from V_Storage_goods_report a? where

? ? ? ? a.GOODS_FULFILL = 0

? ? ? ? and ((a.goods_supplynum >0 and a.goods_supplyweight >0) or a.goods_State =2)

? ? ? ? and 1 = (case when company_code is? null then 1 when a.company_code = company_code then? 1 else 0? end)

? ? ? ? and 1 = (case when warehouse_code is? null then 1 when a.warehouse_code = warehouse_code then? 1 else 0? end)

? ? ? ? and 1 = (case when goods_Codestr1 is? null then 1 when a.goods_Codestr1 = goods_Codestr1 then? 1 else 0? end)

? ? ? ? and 1 = (case when goods_Codestr10 is? null then 1 when a.goods_Codestr10 = goods_Codestr10 then? 1 else 0? end);

? ? ? ? if (cnt>=0 ) then

? ? ? ? ? ? insert into Storage_Inventory

? ? ? ? ? ? (inventory_id,

? ? ? ? ? ? inventory_billcode,

? ? ? ? ? ? inventory_date,

? ? ? ? ? ? goods_state,

? ? ? ? ? ? goods_date,

? ? ? ? ? ? company_code,

? ? ? ? ? ? company_name,

? ? ? ? ? ? coil_no,

? ? ? ? ? ? partsname_name,

? ? ? ? ? ? goods_spec,

? ? ? ? ? ? goods_material,

? ? ? ? ? ? productarea_name,

? ? ? ? ? ? goods_num,

? ? ? ? ? ? goods_weight,

? ? ? ? ? ? enter_area_name,

? ? ? ? ? ? enter_place_name,

? ? ? ? ? ? collect_code,

? ? ? ? ? ? collect_name,

? ? ? ? ? ? collect_date,

? ? ? ? ? ? inventory_area_name,

? ? ? ? ? ? inventory_place_name,

? ? ? ? ? ? inventory_state,

? ? ? ? ? ? pda_confirm_state,

? ? ? ? ? ? operator_code,

? ? ? ? ? ? operator_name,

? ? ? ? ? ? dataaudit_code,

? ? ? ? ? ? dataaudit_name,

? ? ? ? ? ? dataaudit_date,

? ? ? ? ? ? dataaudit_state,

? ? ? ? ? ? org_code,

? ? ? ? ? ? org_name,

? ? ? ? ? ? warehouse_code,

? ? ? ? ? ? warehouse_name,

? ? ? ? ? ? member_code,

? ? ? ? ? ? remarks)

? ? ? ? ? ? select Storage_Inventory_seq.Nextval,

? ? ? ? ? ? ? ? ? 'PDDJ' || to_char(sysdate, 'yyyymmddhh24miss') ||Storage_Inventory_seq.Nextval,

? ? ? ? ? ? ? ? ? sysdate,

? ? ? ? ? ? ? ? ? a.goods_state,

? ? ? ? ? ? ? ? ? a.goods_date,

? ? ? ? ? ? ? ? ? a.company_code,

? ? ? ? ? ? ? ? ? a.company_name,

? ? ? ? ? ? ? ? ? a.goods_codestr3,

? ? ? ? ? ? ? ? ? a.partsname_name,

? ? ? ? ? ? ? ? ? a.goods_spec,

? ? ? ? ? ? ? ? ? a.goods_material,

? ? ? ? ? ? ? ? ? a.productarea_name,

? ? ? ? ? ? ? ? ? a.goods_num,

? ? ? ? ? ? ? ? ? a.goods_weight,

? ? ? ? ? ? ? ? ? a.goods_Codestr10,

? ? ? ? ? ? ? ? ? a.goods_Codestr1,

? ? ? ? ? ? ? ? ? null, -- 采集人代碼

? ? ? ? ? ? ? ? ? null, -- 采集人名稱

? ? ? ? ? ? ? ? ? null, -- 采集時間

? ? ? ? ? ? ? ? ? null, -- 盤點庫區(qū)

? ? ? ? ? ? ? ? ? null, -- 盤點庫位

? ? ? ? ? ? ? ? ? 0, -- 盤點狀態(tài)

? ? ? ? ? ? ? ? ? 0, -- 未確認

? ? ? ? ? ? ? ? ? operator_code,-- 制單人代碼

? ? ? ? ? ? ? ? ? operator_name,-- 制單人

? ? ? ? ? ? ? ? ? null, -- 審核人代碼

? ? ? ? ? ? ? ? ? null, -- 名字

? ? ? ? ? ? ? ? ? null, -- 時間

? ? ? ? ? ? ? ? ? null, -- 狀態(tài)

? ? ? ? ? ? ? ? ? org_code,-- 機構(gòu)

? ? ? ? ? ? ? ? ? org_name,-- 機構(gòu)

? ? ? ? ? ? ? ? ? a.warehouse_code, --倉庫代碼

? ? ? ? ? ? ? ? ? null,

? ? ? ? ? ? ? ? ? a.member_code,

? ? ? ? ? ? ? ? ? null

? ? ? ? ? ? ? from V_Storage_goods_report a

? ? ? ? ? ? ? where

? ? ? ? ? ? ? ? a.GOODS_FULFILL = 0

? ? ? ? ? ? ? ? and ((a.goods_supplynum >0 and a.goods_supplyweight >0) or a.goods_State =2)

? ? ? ? ? ? ? ? and 1 = (case when company_code is? null then 1 when a.company_code = company_code then? 1 else 0? end)

? ? ? ? ? ? ? ? and 1 = (case when warehouse_code is? null then 1 when a.warehouse_code = warehouse_code then? 1 else 0? end)

? ? ? ? ? ? ? ? and 1 = (case when goods_Codestr1 is? null then 1 when a.goods_Codestr1 = goods_Codestr1 then? 1 else 0? end)

? ? ? ? ? ? ? ? and 1 = (case when goods_Codestr10 is? null then 1 when a.goods_Codestr10 = goods_Codestr10 then? 1 else 0? end);

? ? ? ? ? ? Commit;

? ? ? ? end if;

END insertInventory;


ORA-06575:?程序包或函數(shù)?insertInventory處于無效狀態(tài)? ?

此處無效是由于END insertInventory;少寫了?insertInventory;?

IS 和 begin 未頂格寫

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個濱河市菩浙,隨后出現(xiàn)的幾起案子贷腕,更是在濱河造成了極大的恐慌邻遏,老刑警劉巖怠褐,帶你破解...
    沈念sama閱讀 219,490評論 6 508
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件燃辖,死亡現(xiàn)場離奇詭異师崎,居然都是意外死亡瓜浸,警方通過查閱死者的電腦和手機拂酣,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 93,581評論 3 395
  • 文/潘曉璐 我一進店門秋冰,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人踱葛,你說我怎么就攤上這事丹莲。” “怎么了尸诽?”我有些...
    開封第一講書人閱讀 165,830評論 0 356
  • 文/不壞的土叔 我叫張陵甥材,是天一觀的道長。 經(jīng)常有香客問我性含,道長洲赵,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 58,957評論 1 295
  • 正文 為了忘掉前任商蕴,我火速辦了婚禮叠萍,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘绪商。我一直安慰自己苛谷,他們只是感情好,可當我...
    茶點故事閱讀 67,974評論 6 393
  • 文/花漫 我一把揭開白布格郁。 她就那樣靜靜地躺著腹殿,像睡著了一般独悴。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上锣尉,一...
    開封第一講書人閱讀 51,754評論 1 307
  • 那天刻炒,我揣著相機與錄音,去河邊找鬼自沧。 笑死坟奥,一個胖子當著我的面吹牛,可吹牛的內(nèi)容都是我干的拇厢。 我是一名探鬼主播爱谁,決...
    沈念sama閱讀 40,464評論 3 420
  • 文/蒼蘭香墨 我猛地睜開眼,長吁一口氣:“原來是場噩夢啊……” “哼旺嬉!你這毒婦竟也來了管行?” 一聲冷哼從身側(cè)響起,我...
    開封第一講書人閱讀 39,357評論 0 276
  • 序言:老撾萬榮一對情侶失蹤邪媳,失蹤者是張志新(化名)和其女友劉穎捐顷,沒想到半個月后,有當?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體雨效,經(jīng)...
    沈念sama閱讀 45,847評論 1 317
  • 正文 獨居荒郊野嶺守林人離奇死亡迅涮,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 37,995評論 3 338
  • 正文 我和宋清朗相戀三年,在試婚紗的時候發(fā)現(xiàn)自己被綠了徽龟。 大學時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片叮姑。...
    茶點故事閱讀 40,137評論 1 351
  • 序言:一個原本活蹦亂跳的男人離奇死亡,死狀恐怖据悔,靈堂內(nèi)的尸體忽然破棺而出传透,到底是詐尸還是另有隱情,我是刑警寧澤极颓,帶...
    沈念sama閱讀 35,819評論 5 346
  • 正文 年R本政府宣布朱盐,位于F島的核電站,受9級特大地震影響菠隆,放射性物質(zhì)發(fā)生泄漏兵琳。R本人自食惡果不足惜,卻給世界環(huán)境...
    茶點故事閱讀 41,482評論 3 331
  • 文/蒙蒙 一骇径、第九天 我趴在偏房一處隱蔽的房頂上張望躯肌。 院中可真熱鬧,春花似錦破衔、人聲如沸清女。這莊子的主人今日做“春日...
    開封第一講書人閱讀 32,023評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽属桦。三九已至崭放,卻和暖如春棚蓄,著一層夾襖步出監(jiān)牢的瞬間诗宣,已是汗流浹背憎蛤。 一陣腳步聲響...
    開封第一講書人閱讀 33,149評論 1 272
  • 我被黑心中介騙來泰國打工攒巍, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留卦方,地道東北人羊瘩。 一個月前我還...
    沈念sama閱讀 48,409評論 3 373
  • 正文 我出身青樓,卻偏偏與公主長得像盼砍,于是被迫代替她去往敵國和親尘吗。 傳聞我的和親對象是個殘疾皇子,可洞房花燭夜當晚...
    茶點故事閱讀 45,086評論 2 355

推薦閱讀更多精彩內(nèi)容