Archives of the TeradataForum
Message Posted: Wed, 28 May 2008 @ 14:13:05 GMT
Thanks very much for the information. I didn't mention earlier that the example I provided was a portion of the export. I didn't list all the columns, just the beginning of the select.
We finally got this working. This only shows the first few columns of the select. The FastExport created a TEXT file with the pipe character hard-coded and the format for the Fasload was defined as VARTEXT "|"
Thanks for pointing out the mode record and null value indicators. We did as you suggested below and cast all of the columns to an equal length so variable records were not being created.
I appreciate all your help,
Fast Export Example
.BEGIN EXPORT SESSIONS 20 ; .EXPORT OUTFILE /xxxx/xxxxxxx/xxxx_xxx.dat MODE RECORD FORMAT TEXT ; select cast(cast(KSN_ID as format '999999999') as char(9)) ,'|' (CHAR(1)) ,cast(cast(ITEM_ID as format '999999999') as char(9)) ,'|' (CHAR(1)) ,cast(cast(RPT_ID as format '999999999999999') as char(15)) ,'|' (CHAR(1)) ,cast(cast(RPT_ID_SEQ_NBR as format '999') as char(3)) ,'|' (CHAR(1)) ,cast(cast(KSN_CHK_DGT as format '9') as char(1)) ,'|' (CHAR(1)) ,cast(cast(DVSN_NBR as format '999') as char(3)) ,'|' (CHAR(1)) followed by more columns from database.name.tablename; .END EXPORT ;
SET RECORD VARTEXT "|" ; BEGIN LOADING databasename.tablename ERRORFILES xxxx.ERROR_1 ,xxxx.ERROR_2; DEFINE ksn_id (varchar(09)) ,item_id (varchar(09)) ,rpt_id (varchar(15)) ,RPT_ID_SEQ_NBR (varchar(03)) ,KSN_CHK_DGT (varchar(01)) ,DVSN_NBR (VARCHAR(03)) more columns ,FILE=/xxxx/xxxxxxx/xxxx_xxx.dat; INSERT INTO databasename.tablename ( ksn_id ,item_id ,rpt_id ,RPT_ID_SEQ_NBR ,KSN_CHK_DGT ,DVSN_NBR more columns ) VALUES (:ksn_id ,:item_id ,:rpt_id ,:RPT_ID_SEQ_NBR ,:KSN_CHK_DGT ,:DVSN_NBR more columns ); END LOADING;
|Copyright 2016 - All Rights Reserved|
|Last Modified: 28 Jun 2020|