大数据量导出方案_oracle导出表数据命令

大数据量导出方案_oracle导出表数据命令create table CUX_IMPORT_DATA_E45 as select * from CUX_IMPORT_DATA_L11 where 1>2; CREATE TABLE CUX

导出大数据方法。批量导BOM

 
create table CUX_IMPORT_DATA_E45 as
select * from CUX_IMPORT_DATA_L11
where 1>2;
 
CREATE TABLE CUX.lmh_segment1_E41 AS
SELECT * FROM CUX.lmh_segment1_L11
WHERE 1>2;
 
CUX.lmh_segment1_E41
 
CREATE TABLE CUX_IMPORT_DATA_E41 AS
SELECT * FROM CUX_IMPORT_DATA_L11
WHERE 1>2
 
 
DELETE FROM CUX_IMPORT_DATA_E41;
插入表中
INSERT INTO CUX_IMPORT_DATA_E41(A,ID)
select BBO.BILL_SEQUENCE_ID,rownum
from BOM_BILL_OF_MATERIALS BBO,
mtl_system_items_b msi
where bbo.ORGANIZATION_ID = msi.ORGANIZATION_ID
and bbo.ASSEMBLY_ITEM_ID = msi.inventory_item_id
and msi.ORGANIZATION_ID = 140
and msi.inventory_item_status_code=”Active”
AND BBO.BILL_SEQUENCE_ID=664146
;
 
SELECT *
–DELETE
FROM CUX_IMPORT_DATA_E41;
 
分组
UPDATE CUX_IMPORT_DATA_E41 SET B = ROUND(ID/100);
 
/* select * from CUX.lmh_segment1_L11*/
 
 
BOM_BILL_OF_MATERIALS_200113;
 
CREATE TABLE BOM_BILL_OF_MATERIALS_20200401 AS
SELECT bbo.* FROM BOM_BILL_OF_MATERIALS bbo,
mtl_system_items_b msi
where bbo.ORGANIZATION_ID = msi.ORGANIZATION_ID
and bbo.ASSEMBLY_ITEM_ID = msi.inventory_item_id
and msi.ORGANIZATION_ID = 140
and msi.inventory_item_status_code=”Active”;
— AND BBO.BILL_SEQUENCE_ID=664146
 
SELECT * FROM CUX.lmh_segment1_E41;
DELETE FROM CUX.lmh_segment1_E41;
 
DECLARE
CURSOR bom_cur IS
SELECT B FROM CUX_IMPORT_DATA_E41
group by B ;
 
 
BEGIN
FOR L_BOM IN bom_cur LOOP
insert into CUX.lmh_segment1_E41
select
TO_CHAR(msi.segment1) segment1,
TO_CHAR(msii.segment1) segment2,
bic.COMPONENT_QUANTITY,
cux_html_BOM_report.getSubStr(bic.COMPONENT_SEQUENCE_ID,140) sub_item,
cux_html_BOM_report.getdescStr2(bic.COMPONENT_SEQUENCE_ID) descstr,
cux_html_BOM_report.getRevisionStr(bbo.ASSEMBLY_ITEM_ID,140) REVISION,
bbo.attribute10
from BOM_BILL_OF_MATERIALS BBO,–20200401 BBO,
bom_inventory_components BIC,
mtl_system_items_b msi,
mtl_system_items_b msii
where BBO.BILL_SEQUENCE_ID = BIC.BILL_SEQUENCE_ID
and bbo.ORGANIZATION_ID = msi.ORGANIZATION_ID
and bbo.ASSEMBLY_ITEM_ID = msi.inventory_item_id
and bic.COMPONENT_ITEM_ID = msii.inventory_item_id
and bbo.ORGANIZATION_ID = 140
and msii.ORGANIZATION_ID = 140
AND msi.ORGANIZATION_ID = 140
and msii.inventory_item_status_code=”Active”
and nvl(bic.DISABLE_DATE,sysdate+1)>sysdate
AND BBO.BILL_SEQUENCE_ID–=664146
in (SELECT A FROM CUX_IMPORT_DATA_E41 WHERE B = L_BOM.B);
END LOOP;
COMMIT;
END;
 
 
select segment1 ,segment2,component_quantity,sub_item , TO_CHAR(descstr ) A,revision ,attribute10 from CUX.lmh_segment1_E41

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
转载请注明出处: https://daima100.com/9240.html

(0)
上一篇 2023-02-12
下一篇 2023-02-12

相关推荐

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注