I tried to check ExcelTable package
https://github.com/mbleron/ExcelTable
with csv file
select *
from table(
ExcelTable.getRows(
p_file => ExcelTable.getTextFile('WORK_XLS','test_8k.csv')
, p_cols => q'{
"C1" number
, "C2" varchar2(50)
, "C3" varchar2(50)
, "C4" number
, "C5" date format 'DD/MM/YYYY HH24:MI:SS'
, "C6" date format 'DD/MM/YYYY HH24:MI:SS'
, "C7" timestamp(6) format 'DD-MON-YYYY HH.MI.SS.FF9 AM'
, "C8" varchar2(10)
, "C9" varchar2(10)
, "C10" varchar2(1000)
}'
, p_skip => 0
, p_line_term => chr(13)||chr(10)
, p_field_sep => ';'
, p_text_qual => '"'
)
)
;
and got error even with csv file from sample
ORA-00600: internal error code, arguments: [12442], [], [], [], [], [], [], [], [], [], [], []
00600. 00000 – “internal error code, arguments: [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%s], [%s]”
*Cause: This is the generic internal error number for Oracle program
exceptions. It indicates that a process has encountered a low-level,
unexpected condition. The first argument is the internal message
number. This argument and the database version number are critical in
identifying the root cause and the potential impact to your system.
Meanwhile xutl_flatfile.get_fields_delimited works properly with the same file. I use Oracle 21
Any good idea?
2
Per Oracle Support, this may be Bug 32803416 ORA-600 [12442] While Doing Select With A Custom Function
. A possible workaround is provided:
"_column_tracking_level"=49;
You can try setting this at the database level (alter system set "_column_tracking_level"=49
) or session level (alter session set "_column_tracking_level"=49
) or adding to your query with a hint (doesn’t always work):
select /*+ opt_param('_column_tracking_level','49') */
from table( . . .
If this doesn’t work, you’ll need to open an SR with Oracle Support. Otherwise, you’re only option is to try making various semi-random changes until you bypass the bug. Then you’ve found your own workaround, which often is the easiest way to deal with ORA-600s in the near-term.