日本不卡不码高清免费观看,久久国产精品久久w女人spa,黄色aa久久,三上悠亚国产精品一区二区三区

您的位置:首頁技術(shù)文章
文章詳情頁

ORACLE ERP導(dǎo)數(shù)據(jù)(BOM清單)

瀏覽:235日期:2023-11-16 11:42:54
方法:把數(shù)據(jù)導(dǎo)入BOM清單的方法是,把數(shù)據(jù)導(dǎo)入接口表中,讓其自動運行既可。上傳文件的時候,要注重使;;;用ASCII字符模式。1、自己建立一中轉(zhuǎn)表drop table cux_bill_temp;create table cux_bill_temp( ; bill_sequence_id ;number, assembly_item_id;number, organization_id;number, assembly_item;;varchar2(50),--BOM component_sequence_id;;;number, component_quantity;;;number, --組件數(shù)量 item_num;;;;number, --項目序列 operation_seq_num;;;number, --工序序列 component_item_id;;;number, component_item;;;varchar2(50),; --組件 PLANNING_FACTOR;;;number,;;--計劃%d100 component_yield_factor;;number,;;--產(chǎn)出率d1 wip_supply_type;;;number,;;--供給類型 supply_type;;;;varchar2(50), supply_subinventory;;;varchar2(50),;--供給子庫存 OPTIONAL;;;;number,;;--可選的 OPTIONAL_disp;;;;varchar2(10),;--可選的 MUTUALLY_EXCLUSIVE_OPTIONS ;;number,;;--互不相容 MUTUALLY_EXCLUSIVE_O_disp;;varchar2(10),;--互不相容 attribute1;;;;varchar2(50),--排序號 row_num;;;;number)2、刪除中轉(zhuǎn)表中的數(shù)據(jù) delete cux_bill_temp;3、把要導(dǎo)入的數(shù)據(jù)放在擴展名為*.csv的文件中,且要相對應(yīng)于中轉(zhuǎn)表的字段,本例中的文件名為bill.csv。 另外的腳本文件為bill.ctl,其內(nèi)容如下:options (skip=1); //跳過第一行,一般第一行為其字段說明LOAD DATAINFILE bill.csv; //bill.csv為數(shù)據(jù)文件APPENDINTO TABLE cux_bill_tempFIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '''(與中轉(zhuǎn)表相對應(yīng)的字段列表)登錄進(jìn)入Oracle數(shù)據(jù)庫服務(wù)器,利用命令:(sqlload 用戶名/密碼@數(shù)據(jù)庫名)載入文件bill.csv的數(shù)據(jù)入中轉(zhuǎn)表。4、查看中轉(zhuǎn)表中的記錄數(shù)(以備導(dǎo)入數(shù)據(jù)后進(jìn)行對比) select count(*) from cux_bill_temp;5、去除導(dǎo)入時在表bill.csv中的要害字段的空格字符,以免影響導(dǎo)入。 update cux_bill_temp set ASSEMBLY_ITEM=replace(ASSEMBLY_ITEM,' ',''), COMPONENT_ITEM=replace(COMPONENT_ITEM,' ','');6、查看是否有重復(fù)的選項(既是否重復(fù)了Item) select assembly_item,component_item,min(row_num),count(*) from cux_bill_temp group by assembly_item,component_item having count(*)>1;假如有重復(fù)的Item,則要刪除(或是重新合并)delete cux_bill_tempwhere row_num in (select min(row_num) from cux_bill_temp group by assembly_item,component_item having count(*)>1);以下步驟為選做(如有重復(fù)才做,沒有重復(fù)不做7-10)7、再重新建立一個臨時表(對于有重復(fù)數(shù)據(jù),則只取一條數(shù)據(jù),現(xiàn)取row_num最小的一條) drop table cux_bill_a;create table cux_bill_aasselect assembly_item,component_item,component_quantity,PLANNING_FACTOR,component_yield_factor,supply_type,supply_subinventory,OPTIONAL_disp,MUTUALLY_EXCLUSIVE_O_disp,attribute1,min(row_num) row_numfrom cux_bill_tempgroup by assembly_item,component_item,component_quantity,PLANNING_FACTOR,component_yield_factor,supply_type,supply_subinventory,OPTIONAL_disp,MUTUALLY_EXCLUSIVE_O_disp,attribute1;8、刪除cux_bill_temp表 delete cux_bill_temp;9、再重cux_bill_a表中把數(shù)據(jù)導(dǎo)入給cux_bill_temp表,完成把重復(fù)數(shù)據(jù)剔除的功能insert into cux_bill_temp(assembly_item,component_item,component_quantity,PLANNING_FACTOR,component_yield_factor,supply_type,supply_subinventory,OPTIONAL_disp,MUTUALLY_EXCLUSIVE_O_disp,attribute1,row_num)select assembly_item,component_item,component_quantity,PLANNING_FACTOR,component_yield_factor,supply_type,supply_subinventory,OPTIONAL_disp,MUTUALLY_EXCLUSIVE_O_disp,attribute1,row_numfrom cux_bill_a;10、刪除表cux_bill_a drop table cux_bill_a;11、再檢查一次表,是否有重復(fù)的數(shù)據(jù) select assembly_item,component_item,min(row_num),count(*)from cux_bill_tempgroup by assembly_item,component_itemhaving count(*)>1;12、查看在mtl_system_items表中,既是在庫存表中,有沒有不存在的Item.select distinct itemfrom (select distinct assembly_item itemfrom cux_bill_temp bwhere not exists (select null from mtl_system_items where segment1=b.assembly_item and organization_id=2)unionselect distinct component_item itemfrom cux_bill_temp bwhere not exists (select null from mtl_system_items where segment1=b.component_item and organization_id=2))order by item;13、假如在mtl_system_items中,有不存在的物品ITEM時,要把其刪除(或是把這些物品Item導(dǎo)入到系統(tǒng)中) 刪除:delete cux_bill_temp b where; not exists (select null from mtl_system_items where segment1=b.component_item and organization_id=2); delete cux_bill_temp a where not exists; (select null from mtl_system_items where segment1=a.assembly_item; and organization_id=2);14、對沒有物品Item的進(jìn)行處理,把其放入另一臨時表cux_item_temp中(以備查詢及導(dǎo)入mtl_system_items表中) delete cux_item_temp; insert into cux_item_temp(segment1,description)select distinct item,itemfrom (select distinct assembly_item itemfrom cux_bill_temp bwhere not exists (select null from mtl_system_items where segment1=b.assembly_item and organization_id=2)unionselect distinct component_item itemfrom cux_bill_temp bwhere not exists (select null from mtl_system_items where segment1=b.component_item and organization_id=2))將找到?jīng)]有ITEM的BOM數(shù)據(jù)放到另一個表中,以備下次ITEM導(dǎo)入后在導(dǎo)BOMcreate table cux_bom_temp1select distinct itemfrom (select distinct assembly_item itemfrom cux_bill_temp bwhere not exists (select null from mtl_system_items where segment1=b.assembly_item and organization_id=2)unionselect distinct component_item itemfrom cux_bill_temp bwhere not exists (select null from mtl_system_items where segment1=b.component_item and organization_id=2))-----------------------------------------------------------------------------------------------------------15、從表mtl_system_items中把物品的編碼ID加入中轉(zhuǎn)表cux_bill_temp表(從項目主組織)中 update cux_bill_temp b set assembly_item_id=(select inventory_item_id from mtl_system_items where segment1=b.assembly_item and organization_id=2), component_item_id=(select inventory_item_id from mtl_system_items where segment1=b.component_item and organization_id=2);16、查看是否有沒有物品ID的編碼存在(既沒有物品的ID被導(dǎo)入臨時表cux_bill_temp中) select row_num from cux_bill_temp where assembly_item_id is null or component_item_id is null;17、對其中導(dǎo)入的數(shù)據(jù)進(jìn)行處理 update cux_bill_temp set OPTIONAL=1 where upper(OPTIONAL_disp) like 'Y%'; update cux_bill_temp set OPTIONAL=2 where OPTIONAL is null; update cux_bill_temp set MUTUALLY_EXCLUSIVE_OPTIONS=1 where upper(MUTUALLY_EXCLUSIVE_O_DISP) like 'Y%'; update cux_bill_temp set MUTUALLY_EXCLUSIVE_OPTIONS=2 where MUTUALLY_EXCLUSIVE_O_DISP is null;18、查看cux_bill_temp中的數(shù)據(jù)處理是否有漏 select count(*) from cux_bill_temp where OPTIONAL is null or MUTUALLY_EXCLUSIVE_OPTIONS is null or assembly_item_id is null or component_item_id is null;19、更新其內(nèi)的WIP_SUPPLY_TYPE; update cux_bill_temp set WIP_SUPPLY_TYPE=6 where component_item like 'B%';20、刪除表中的包(cux_bill_temp中),其相對應(yīng)于表bom_bill_of_materials(既在表中已經(jīng)存在了些選項包,不必導(dǎo)入包頭,只需導(dǎo)入包內(nèi)容既可) delete cux_bill_temp twhere exists (select null from bom_bill_of_materials where assembly_item_id=t.assembly_item_id and organization_id=2);21、利用已經(jīng)寫好的包寫入數(shù)據(jù)(既寫入接口表bom_bill_of_mtls_interface) exec cux_bom_temp.insert_bill_15(1);select count(*) from cux_bill_temp tempwhere exits (select null from bom_inventory_components; b where temp.bill_sequence_id=b.bill_sequence_id and temp.component_item_id=b.component_item_id);delete cux_bill_temp tempwhere exists (select null from bom_inventory_components; b where b.bill_sequence_id=temp.bill_sequence_id and b.component_item_id=temp.component_item_id); exec cux_bom_temp.insert_bill_10(1);22、對寫入的數(shù)據(jù)在接口表中的情況進(jìn)行查看 select count(*) from bom_bill_of_mtls_interface;23、接著更新 exec cux_bom_temp.insert_bill_15(1); select count(*) from cux_bill_temp where bill_sequence_id is null; exec cux_bom_temp.insert_bill_20(1);去提交請求select count(*) from bom_inventory_comps_interface;(導(dǎo)入成功后)對組件進(jìn)行排序 exec cux_bom_temp.update_bill_item_num4; select count(*) from bom_inventory_comps_interface;24、對于接口表中的數(shù)據(jù)進(jìn)行導(dǎo)入delete bom_bill_of_mtls_interface;insert into bom_bill_of_mtls_interface(assembly_type,assembly_item_id,organization_id, process_flag,transaction_type)select ;distinct 1,assembly_item_id,1,1,'CREATE'from cux_bill_temp;
標(biāo)簽: Oracle 數(shù)據(jù)庫
日本不卡不码高清免费观看,久久国产精品久久w女人spa,黄色aa久久,三上悠亚国产精品一区二区三区
天堂成人免费av电影一区| 欧美日韩夜夜| 91亚洲国产成人久久精品| 日本一区二区高清不卡| 99香蕉国产精品偷在线观看| 日韩三级久久| 午夜在线精品偷拍| 日韩国产综合| 国产伦理一区| 亚洲一区二区三区无吗| 丝袜美腿诱惑一区二区三区| 国产精品一二| 欧美一区二区三区久久| 美日韩精品视频| 亚洲欧洲一区| 一区在线观看| 伊人久久亚洲影院| 成人免费电影网址| 国产一区二区三区国产精品| 亚州欧美在线| 亚洲精品免费观看| 亚洲欧美专区| 欧美偷窥清纯综合图区| 亚洲精品美女| 综合一区在线| 欧美视频久久| 久久免费影院| 久久精品系列| 久久久男人天堂| 国产精品hd| 国产videos久久| 日韩电影免费网站| 精品欧美久久| 亚洲激情精品| 99香蕉国产精品偷在线观看 | 免费不卡在线观看| 蜜芽一区二区三区| 亚洲2区在线| 日本v片在线高清不卡在线观看| 蜜桃视频在线观看一区二区| 日本成人在线网站| 另类专区亚洲| 亚洲精品国产精品粉嫩| 久久a爱视频| 五月天久久777| 9国产精品视频| 精品欧美日韩精品| 久久亚洲影院| sm捆绑调教国产免费网站在线观看| 亚洲激情二区| 91中文字幕精品永久在线| 国产美女一区| 日本在线高清| 国产欧美日韩精品高清二区综合区 | 国产一区亚洲| 国产精品超碰| 丝袜美腿亚洲色图| 日本免费一区二区三区四区| 亚洲精品乱码久久久久久蜜桃麻豆 | 久久xxxx精品视频| 欧美激情三区| 亚洲精品人人| 久久精品三级| 久久精品 人人爱| 免费久久精品视频| 日韩亚洲国产欧美| 在线成人动漫av| 高清精品久久| 国产理论在线| 国产一区二区三区国产精品| 91精品国产自产观看在线 | 国产欧美一区二区色老头| 欧美理论视频| 三上悠亚国产精品一区二区三区 | 日韩欧美2区| 亚洲欧美日韩视频二区| 久久精品123| 国产精品99一区二区| 欧美日韩精品免费观看视完整| 精品国产三区在线| 国产成人久久精品一区二区三区| 久久尤物视频| 久久久夜精品| 99视频在线精品国自产拍免费观看| 国内精品福利| 久久亚洲电影| 欧美日韩在线精品一区二区三区激情综合| 亚洲一区网站| 亚洲一区二区三区四区五区午夜 | 97成人超碰| 麻豆国产欧美日韩综合精品二区| 国产亚洲一卡2卡3卡4卡新区| 国产伦精品一区二区三区视频 | 日韩精品一二三区| 色婷婷成人网| 久久永久免费| 在线亚洲一区| 青青草国产精品亚洲专区无| 精品欠久久久中文字幕加勒比| 日韩精品永久网址| 99精品综合| 日韩专区欧美专区| 国产精品一区二区美女视频免费看| 久久精品免视看国产成人| 久久av免费看| 久久国内精品自在自线400部| 一区久久精品| 日韩电影二区| 中文字幕在线看片| 日韩精品一二区| 久久视频精品| 香蕉精品久久| 日韩精品中文字幕第1页| 在线看片国产福利你懂的| 在线日韩一区| 好吊日精品视频| 日本中文字幕不卡| 精品国产一区二| 99视频精品免费观看| 国产亚洲精品美女久久| 色爱av综合网| 国产成人久久精品麻豆二区| 国产精品美女在线观看直播| 电影天堂国产精品| 日韩欧美久久| 久久在线电影| 久久激情五月婷婷| 欧美资源在线| 久久久久久久久99精品大| 国产视频网站一区二区三区| 美女精品一区二区| 老色鬼久久亚洲一区二区| 国产91欧美| 国产欧美三级| 亚欧成人精品| 国产农村妇女精品一二区| 日韩欧美精品一区| 亚洲风情在线资源| 精品一区二区三区视频在线播放| 久久亚洲风情| 亚洲日产av中文字幕| 久久精品国产www456c0m| 精品淫伦v久久水蜜桃| 久久精品99国产精品日本| 日韩av网站在线免费观看| 四虎4545www国产精品| 久久精品国产99国产精品| 国产一卡不卡| 青草久久视频| 国产亚洲字幕| 免费亚洲一区| 超级白嫩亚洲国产第一| 精品国产乱码久久久久久1区2匹| 欧美成a人国产精品高清乱码在线观看片在线观看久 | 亚洲一区成人| 免费中文字幕日韩欧美| 久久亚洲精品伦理| 日韩国产精品久久久| 国产精品15p| 99久久激情| 亚洲精品在线a| 欧美极品一区二区三区| 激情久久一区二区| 久久人人99| 日韩国产精品久久久| 国际精品欧美精品| 亚洲一区二区三区免费在线观看 | 亚洲播播91| 亚洲精品女人| 国产一区二区三区不卡视频网站| 国产亚洲一区二区手机在线观看| 国产精品99一区二区| 欧美日韩精品一区二区三区视频| 久久99蜜桃| 国产中文在线播放| 国产激情欧美| 精品国产亚洲一区二区三区在线 | 中文字幕在线看片| 欧美日韩视频免费观看| 欧美日韩四区| 久久精品国产久精国产爱| 日本不卡免费高清视频在线| 欧美特黄一区| 久久精品一区二区国产| 国产精品毛片一区二区三区| 久久国内精品视频| 极品av在线| 尤物在线精品| 国产精品国产三级国产在线观看| 久久九九国产| 欧美亚洲专区| 免费在线观看不卡| 日韩国产一区| 美女久久精品| 日韩av中文在线观看| 国产一区导航| 亚洲免费影院| 午夜电影亚洲| 99精品在线观看| 中文在线а√在线8|