Oracle SQLLDR Use (fast import, but weak handling of the data itself)
Blog Category:
Oraclesql Sqlload.cmd
SQL code
- Pause
- Sqlldr user/[email protected] control.ctl skip=1 rows=2000 bindsize=8192000
- Pause
Control.ctl
SQL code
- LOAD DATA
- INFILE ' rating201001.csv '
- APPEND
- into TABLE "Tbl_sell"
- Fields TERMINATED by ', ' optionally enclosed by ' "'
- --fields TERMINATED by ', '
- --NULL is allowed when the table field does not have a corresponding value
- TRAILING Nullcols
- --The following field order corresponds to the comma-separated field order in the CSV file, and you can refer to the values of other columns by using: Field names
- (
- Src_type_code,
- --Year_month "201002", ignoring the second column value and using a fixed value
- Year_month,
- P_index,
- Province,
- City,
- Country,
- Shop_name "trim (: Shop_name)",
- Shop_code,
- Brand_Name,
- Sell_count,
- Sell_money,
- Shop_rating,
- Type_code "decode (: Src_type_code,10,5,:src_type_code)"
- )
Oracle SQLLDR is used (import is fast, but processing of the data itself is weak)