DBMS_DATAPUMP example of extracting data based on a query when both the table name and column name are not in upper case and have been created by using double quotes. This does not seem to be possible from the command line......
declare
h1 number;
v_job_state varchar2(4000);
begin
h1 := dbms_datapump.open(operation => 'EXPORT',
job_mode => 'TABLE',
job_name => 'HARRY10');
dbms_datapump.add_file(h1,
'example1.dmp',
'DATA_PUMP_DIR',
reusefile => 1);
dbms_datapump.add_file(h1,
'example1.log',
'DATA_PUMP_DIR',
reusefile => 1,
filetype => dbms_datapump.ku$_file_type_log_file);
dbms_datapump.metadata_filter(handle => h1,
name => 'NAME_EXPR',
value => 'IN (''Data'')',
object_type => 'TABLE');
dbms_datapump.data_filter(handle => h1,
name => 'SUBQUERY',
value => 'WHERE "DataID" = 1');
dbms_datapump.start_job(h1);
DBMS_DATAPUMP.WAIT_FOR_JOB(h1, v_job_state);
DBMS_OUTPUT.PUT_LINE(v_job_state);
end;
/
Comments
Post a Comment