第一步: 首先打开 teradata fastload.exe
第二步: 通过粘贴导入脚本
脚本:
SESSIONS 4;
ERRLIMIT 25;
SET RECORD VARTEXT ",";LOGON localhost/Teradata_Education,Educate;
/* localhost:IP Address; Teradata_Education:user name; Educate:password */DROP TABLE PT_TEMP_P.RFM_LABEL;
DROP TABLE PT_TEMP_P.RFM_LABEL_ERROR1;
DROP TABLE PT_TEMP_P.RFM_LABEL_ERROR2;CREATE MULTISET TABLE PT_TEMP_P.RFM_LABEL (R VARCHAR(20),F VARCHAR(20),M VARCHAR(20),CNT VARCHAR(20),LAB VARCHAR(20)
);
RECORD 2;
Define
ID0 (VARCHAR(20)),R (VARCHAR(20)),F (VARCHAR(20)),M (VARCHAR(20)),CNT (VARCHAR(20)), LAB (VARCHAR(20))
File=c:/tmp/RFM_label.csv; /* source file location */ BEGIN LOADING PT_TEMP_P.RFM_LABEL
ERRORFILES PT_TEMP_P.RFM_LABEL_ERROR1,PT_TEMP_P.RFM_LABEL_ERROR2
;
INSERT INTO PT_TEMP_P.RFM_LABEL VALUES (:R,:F,:M,:CNT,:LAB);
END LOADING;LOGOFF;
第三步: 完成后可在teradata中查看表:
SELECT *
FROM PT_TEMP_P.RFM_LABEL;
更详细说明另见: http://www.cnblogs.com/toughhou/p/3813668.html