please help
naveen, August 21, 2018 - 4:41 pm UTC
I have a query like below to do expdp.
but it is not working. please help.
dumpfile=exp_PROD_DWC_OWNER_IN11435529.dmp
directory=DPUMP
log=exp_PROD_DWC_OWNER_IN11435529.log
tables=dwc_owner.idp_details
dwc_owner.prm_details
query="select a.*, b.* from dwc_owner.idp_details a, dwc_owner.prm_details b where a.acct_sched=b.acct_sched and a.original_book_date >'30-APR-2018' and b.updated_on >'30-APR-2018'"
August 22, 2018 - 1:53 am UTC
Create a view based on your SQL,
create view mv_view as
select a.*, b.*
from dwc_owner.idp_details a, dwc_owner.prm_details b
where a.acct_sched=b.acct_sched
and a.original_book_date >'30-APR-2018'
and b.updated_on >'30-APR-2018'
and then use
views_as_tables=my_view
on your datapump command line
complex join query with 5 tables
A reader, August 28, 2018 - 10:04 am UTC
I want to exp the results of 5 tables which need to demand the query below,how can I do it:
select *
from ufzsswxt.T_PM_N_ORDER odr
join ufzsswxt.T_PM_N_ORDER_TRADE trade on odr.ORDER_ID = trade.ORDER_ID
join ufzsswxt.T_PM_N_ORDER_DETAIL dtl on trade.TRADE_ID = dtl.TRADE_ID
LEFT join ufzsswxt.T_PM_N_ORDER_PAY pay ON trade.trade_id = pay.trade_id
left join ufzsswxt.T_PM_N_ORDER_SNAPSHOT odr_snap ON dtl.DETAIL_ID = odr_snap.order_detail_id and dtl.SKU_ID = odr_snap.sku_id
where odr.business_status in ('TO_BE_PAY','TO_BE_SHIP', 'SHIPPING','REFUNDOK','FINISH','AFTER_SALE','CLOSE','SHIPOK')
and odr.CHANNEL_ID in('GDJSYH1','GDJSYH','KHD_QD','XYKJ1','XYKJ2','ZYHLWYK','10085MALL','HD_LTDH')
and odr.create_time >=to_date('2018-07-01 00:00:00','yyyy-mm-dd hh24:mi:ss')
and odr.create_time <to_date('2018-08-01 00:00:00','yyyy-mm-dd hh24:mi:ss');