load控制文件如下
LOAD DATA
INFILE 'e:\loc_txn_log.dat'
APPEND
INTO TABLE LOC_TXN_LOG
FIELDS TERMINATED BY ","
(
log_sq INTEGER EXTERNAL DEFAULTIF (log_sq = BLANKS),
txn_brh_id char( 7),
txn_dt char( 8),
txn_tm char( 6),
open_brh_id char( 7),
acct_id char( 8),
acct_class_cd char( 2),
acct_nm char( 30),
pid_cd char( 2),
pid_id char( 18),
period_qt INTEGER EXTERNAL DEFAULTIF (period_qt = BLANKS),
black_sta_cd char( 1),
black_type_cd char( 1),
prt_bal_at INTEGER EXTERNAL DEFAULTIF (prt_bal_at = BLANKS),
txn_at INTEGER EXTERNAL DEFAULTIF (txn_at = BLANKS),
int_txn_cd char( 5),
ext_txn_cd char( 10),
opr_id char( 5),
txn_src_cd char( 1),
txn_cross_cd char( 1),
loc_txn_seq_id char( 5),
ext_txn_seq_id char( 12),
orig_txn_dt char( 8),
orig_txn_seq_id char( 5),
curr_bal_at INTEGER EXTERNAL DEFAULTIF (curr_bal_at = BLANKS),
int_base_at INTEGER EXTERNAL DEFAULTIF (int_base_at = BLANKS),
int_at INTEGER EXTERNAL DEFAULTIF (int_at = BLANKS),
tax_at INTEGER EXTERNAL DEFAULTIF (tax_at = BLANKS),
fee_at INTEGER EXTERNAL DEFAULTIF (fee_at = BLANKS),
process_fee_at INTEGER EXTERNAL DEFAULTIF (process_fee_at = BLANKS),
roll_int_at INTEGER EXTERNAL DEFAULTIF (roll_int_at = BLANKS),
save_int_at INTEGER EXTERNAL DEFAULTIF (save_int_at = BLANKS),
txn_sta_cd char( 1),
rev_txn_type_cd char( 1),
txn_prt_cd char( 4),
stl_in char( 1),
open_mode_cd char( 1),
int_start_dt char( 8),
fee_accept_cd char( 1),
log_tx char( 120),
merchant_id char( 15),
term_port_id char( 8),
txn_quest_in char( 1),
batch_no char( 4),
sup_opr_id char( 5),
last_upd_opr_id constant "99999",
last_upd_pgm_id constant "LOAD",
last_upd_ts SYSDATE
)
LOAD DATA
INFILE 'e:\loc_txn_log.dat'
APPEND
INTO TABLE LOC_TXN_LOG
FIELDS TERMINATED BY ","
(
log_sq INTEGER EXTERNAL DEFAULTIF (log_sq = BLANKS),
txn_brh_id char( 7),
txn_dt char( 8),
txn_tm char( 6),
open_brh_id char( 7),
acct_id char( 8),
acct_class_cd char( 2),
acct_nm char( 30),
pid_cd char( 2),
pid_id char( 18),
period_qt INTEGER EXTERNAL DEFAULTIF (period_qt = BLANKS),
black_sta_cd char( 1),
black_type_cd char( 1),
prt_bal_at INTEGER EXTERNAL DEFAULTIF (prt_bal_at = BLANKS),
txn_at INTEGER EXTERNAL DEFAULTIF (txn_at = BLANKS),
int_txn_cd char( 5),
ext_txn_cd char( 10),
opr_id char( 5),
txn_src_cd char( 1),
txn_cross_cd char( 1),
loc_txn_seq_id char( 5),
ext_txn_seq_id char( 12),
orig_txn_dt char( 8),
orig_txn_seq_id char( 5),
curr_bal_at INTEGER EXTERNAL DEFAULTIF (curr_bal_at = BLANKS),
int_base_at INTEGER EXTERNAL DEFAULTIF (int_base_at = BLANKS),
int_at INTEGER EXTERNAL DEFAULTIF (int_at = BLANKS),
tax_at INTEGER EXTERNAL DEFAULTIF (tax_at = BLANKS),
fee_at INTEGER EXTERNAL DEFAULTIF (fee_at = BLANKS),
process_fee_at INTEGER EXTERNAL DEFAULTIF (process_fee_at = BLANKS),
roll_int_at INTEGER EXTERNAL DEFAULTIF (roll_int_at = BLANKS),
save_int_at INTEGER EXTERNAL DEFAULTIF (save_int_at = BLANKS),
txn_sta_cd char( 1),
rev_txn_type_cd char( 1),
txn_prt_cd char( 4),
stl_in char( 1),
open_mode_cd char( 1),
int_start_dt char( 8),
fee_accept_cd char( 1),
log_tx char( 120),
merchant_id char( 15),
term_port_id char( 8),
txn_quest_in char( 1),
batch_no char( 4),
sup_opr_id char( 5),
last_upd_opr_id constant "99999",
last_upd_pgm_id constant "LOAD",
last_upd_ts SYSDATE
)
我的建标SQL是
create table loc_txn_log (
log_sq number(12) not null,
txn_brh_id char(7) not null,
txn_dt char(8) not null,
txn_tm char(6) default ' ' not null,
open_brh_id char(7) default ' ' not null,
acct_id char(8) default ' ' not null,
acct_class_cd char(2) default '00' not null,
acct_nm char(30) default ' ' not null,
pid_cd char(2) default ' ' not null,
pid_id char(18) default ' ' not null,
period_qt number(4) default 0 not null,
black_sta_cd char(1) default ' ' not null,
black_type_cd char(1) default ' ' not null,
prt_bal_at number(12) default 0 not null,
txn_at number(12) default 0 not null,
int_txn_cd char(5) default ' ' not null,
ext_txn_cd char(10) default ' ' not null,
opr_id char(5) default ' ' not null,
txn_src_cd char(1) default '0' not null,
txn_cross_cd char(1) default '0' not null,
loc_txn_seq_id char(5) not null,
ext_txn_seq_id char(12) default ' ' not null,
orig_txn_dt char(8) default ' ' not null,
orig_txn_seq_id char(5) default ' ' not null,
curr_bal_at number(12) default 0 not null,
int_base_at number(10) default 0 not null,
int_at number(9) default 0 not null,
tax_at number(9) default 0 not null,
fee_at number(9) default 0 not null,
process_fee_at number(9) default 0 not null,
roll_int_at number(9) default 0 not null,
save_int_at number(9) default 0 not null,
txn_sta_cd char(1) default '2' not null,
rev_txn_type_cd char(1) default ' ' not null,
txn_prt_cd char(4) default ' ' not null,
stl_in char(1) default 'N' not null,
open_mode_cd char(1) default '0' not null,
int_start_dt char(8) default ' ' not null,
fee_accept_cd char(1) default 'C' not null,
log_tx varchar2(120) default ' ' not null,
merchant_id char(15) not null,
term_port_id char(8) not null,
txn_quest_in char(1) default 'N' not null,
batch_no char(4) not null,
sup_opr_id char(5) default ' ' not null,
last_upd_opr_id char(5) not null,
last_upd_pgm_id char(5) not null,
last_upd_ts date not null,
primary key (log_sq)
);谁能帮我写个CTL语句啊,我送100分