Archives of the TeradataForum
Message Posted: Mon, 02 Feb 2009 @ 16:37:02 GMT
Subj: | | Regarding Bteq Scripts |
|
From: | | Dharmawat, Rahul |
Hi
I was trying to export the records by the below script. Records are successfully exported in a file.
When I was trying to import the records, it is not giving me any error but records are not loaded in a table.
Request to all of you please let me know the error.
rm -f test_exp.dat
TMP_FILE=/home/smithsag/teradata_tut
bteq< 0 THEN .quit 8;
.set titledashes off;
.set titles off;
.set width 254;
.export FILE=${TMP_FILE}/test_exp.dat
select empno,empname from work_db.employee;
.export reset;
.IF ERRORCODE <> 0 THEN .quit 8;
.quit 0;
EOF1
------------------------------------
TMP_FILE=/home/smithsag/teradata_tut
bteq< 0 THEN .quit 8;
.import REPORT FILE=${TMP_FILE}/test_exp.dat
.quiet on
.repeat *
USING in_empno (INTEGER)
, in_empnm (CHAR(8))
INSERT INTO work_db.employee
(empno,empname)
VALUES ( :in_empno
, :in_empnm)
;
.IF ERRORCODE <> 0 THEN .quit 8;
.quit 0;
EOF1
|