|
|
Archives of the TeradataForum
Message Posted: Tue, 22 Oct 2002 @ 19:45:38 GMT
Subj: | | Re: Producing large extract files |
|
From: | | Linda Borushko |
This fastexport runs on win NT and produces a fixed length flat file. Note that all fields must be converted to char and given a
size.
/*--------------------------------------------------------------------
EXTRACT NEW RECORDS FROM THE TABLE
+ ------------------------------------------------------------------*/
.LOGTABLE dbname.EXP_LOG
;
DATABASE dbname ;
.BEGIN EXPORT SESSIONS 16
;
.EXPORT OUTFILE l:\outputfile.txt
FORMAT TEXT
MODE RECORD
;
SELECT A.F1 (CHAR (09))
,A.F2 (CHAR (06))
,A.F3 (CHAR (30))
,A.F4 (CHAR (30))
,A.F5_DATE (CHAR (08))
,A.F6_DATE (CHAR (08))
FROM dbname.tablename1 A
WHERE A.STORED_ON_TABLE_DT >
(SELECT MAX(B.STORED_ON_TABLE_DT)
FROM dbname.tablename2 B)
;
.END EXPORT;
;
| |