A BTEQ IMPORT SAMPLE

#recommerd for small dataset

.MAXERROR 1

.LOGON $TDP/$USER, $PWD

.SET ERRORLEVEL 3807 SEVERITY 0;
DROP TABLE  TESTDB.TESTLOADINGTABLE;
.SET ERRORLEVEL 3807 SEVERITY 8;

CREATE MULTISET TABLE TESTDB.TESTLOADINGTABLE
(
a VARCHAR(50),
b VARCHAR(50),
c VARCHAR(100)
)
PRIMARY INDEX ( a )
;

.IMPORT VARTEXT '       ' FILE = dataset.txt

.REPEAT *
USING
  a   (VARCHAR(50))
, b   (VARCHAR(50))
, c    (VARCHAR(100))
INSERT INTO TESTDB.TESTLOADINGTABLE
(
  a
, b
, c
)
VALUES
(
  :a
, :b
, :c
)
;

.QUIT

你可能感兴趣的:(c,File,user,table,insert,import)