diff --git a/MARS_Packages/REL01_ADDITIONS/MARS-828/new_version/FILE_ARCHIVER.pkb b/MARS_Packages/REL01_ADDITIONS/MARS-828/new_version/FILE_ARCHIVER.pkb index f26633e..e3e914b 100644 --- a/MARS_Packages/REL01_ADDITIONS/MARS-828/new_version/FILE_ARCHIVER.pkb +++ b/MARS_Packages/REL01_ADDITIONS/MARS-828/new_version/FILE_ARCHIVER.pkb @@ -139,6 +139,7 @@ AS vTableName := DBMS_ASSERT.SCHEMA_NAME(vSourceFileConfig.ODS_SCHEMA_NAME) || '.'||DBMS_ASSERT.simple_sql_name(vSourceFileConfig.TABLE_ID)||'_ODS'; -- Use strategy-based WHERE clause (MARS-828) + -- Using GROUP BY instead of DISTINCT to avoid ORA-22950 (object type ordering issue) vQuery := ' select t_filename( file$name @@ -146,11 +147,11 @@ AS , to_char(h.workflow_start,''yyyy'') , to_char(h.workflow_start,''mm'') ) - from '||vTableName||' s join CT_MRDS.a_workflow_history h on s.a_workflow_history_key = h.a_workflow_history_key - where ' || GET_ARCHIVAL_WHERE_CLAUSE(vSourceFileConfig) + where ' || GET_ARCHIVAL_WHERE_CLAUSE(vSourceFileConfig) || ' + group by file$name, file$path, to_char(h.workflow_start,''yyyy''), to_char(h.workflow_start,''mm'')' ; -- Get all files that will be archived into "vfiles" collection ("regular data files")