How to import specified cells in csv to oracle table with sql loader -



How to import specified cells in csv to oracle table with sql loader -

given csv file 'example.csv'

i load cell c7 column x cell c8 column y cell d7 column z

of oracle table 'exampletable'

and on. csv file not have orderly rows , columns, cannot load csv file new table cleanly. asking how map cells table columns loading file oracle (xe). can point me tutorial?

i realize pretty elementary, please allow me know if have under-specified in question.

sql*loader operates on rows of input info , shoves them table. can either append rows table, or truncate table , insert. there no updating. want load info column in input file different table columns, not do.

that said, 1 able utilize 'when' clause of command file load entire row differently based on value beingness tested. so, example, 1 have parent , kid records in 1 csv info file long there input info column differentiates between 2 key off of. perhaps tricky , utilize accomplish desired result if info want load has column can key off of row load differently.

for illustration here sample command file loads 1 csv file 2 tables, depending on first field. if 'p' info loaded parent table, if 'c' info loaded kid table. if have csv info column value can test see row format use, expect load same table differently, specifying different layout. so, row c7 going table.column x need load differently row c8 goes table.column y. have specify entire row though. interested see result if seek it.

options (direct=true) unrecoverable load info truncate table load_test_parent_rows when (01) = 'p' fields terminated ',' trailing nullcols ( rec_skip filler position(1) ,clm_claim_id char nullif(clm_claim_id=blanks) ,file_purpose_cd char nullif(file_purpose_cd=blanks) ,file_ref_id char nullif(file_ref_id=blanks) ) table load_test_child_rows when (01) = 'c' fields terminated ',' trailing nullcols ( rec_skip filler position(1) ,sl_claim char nullif(sl_claim=blanks) ,sl_line_nbr char nullif(sl_line_nbr=blanks) ,sl_d_proc char nullif(sl_d_proc=blanks) )

let know happens when load same table, 1 handbag of tricks.

oracle csv oracle11g sql-loader

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -