我们正在尝试将FastExport创建的文件加载到oracle数据库中.
但是,Float列的导出方式如下:1.47654345670000000000 E010.
如何配置SQL * Loader来导入它.
期望控制脚本看起来像:
OPTIONS(DIRECT=TRUE, ROWS=20000, BINDSIZE=8388608, READSIZE=8388608)
UNRECOVERABLE LOAD DATA
infile 'data/SOME_FILE.csv'
append
INTO TABLE SOME_TABLE
fields terminated by ','
OPTIONALLY ENCLOSED BY '"' AND '"'
trailing nullcols (
FLOAT_VALUE CHAR(38) "???????????????????",
FILED02 CHAR(5) "TRIM(:FILED02)",
FILED03 TIMESTAMP "YYYY-MM-DD HH24:MI:SS.FF6",
FILED04 CHAR(38)
)
我试过to_number(‘1.47654345670000000000 E010′,’9.99999999999999999999 EEEE’)
Error: ORA-01481: invalid number format model error.
我试过to_number(‘1.47654345670000000000 E010′,’9.99999999999999999999EEEE’)
Error: ORA-01722: invalid number
这些是我按照优先顺序提出的解决方案:
> to_number(替换(‘1.47654345670000000000 E010’,”,”))
> to_number(TRANSLATE(‘1.47654345670000000000 E010′,’1′,’1’))
我想知道是否有更好的解决方案.