Home > database > For help, oracle using SQLLDR import multiple TXT to a table, want to implement a field in the table
For help, oracle using SQLLDR import multiple TXT to a table, want to implement a field in the table
Time:10-02
1, table test_member structure is the name, code, department 2, dept1. TXT file content is: Technology department Zhang SAN. 2013123 Li si. 2013234 Fifty. 2013345
Dept2. TXT file content is: Purchasing department Chen six; 2013123 Zhao qi; 2013234 Sun eight; 2013345
3, my idea is that in the CTL control file, in a similar case when the condition judgment, the department in the table according to the different TXT assign different values, such as: The load data Characterset al32utf8 Infile "D: \ dept1. TXT" Infile "D: \ dept2. TXT" Into the table test_member ( The name terminated by '; ' Code terminated by whitespace Department constant (case when infile="D: \ dept1 TXT" then "technology" the when infile="D: \ dept2. TXT" then "purchasing" else "" end) ) This case the when I was a shot in the dark, so please look great god, I want to achieve SQLLDR table fields according to different infile how to assign a different default values, change how to do? If I think this case the when feasible, the control file should how to write?
CodePudding user response:
Found no such option, but the following two methods, you consult