Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 06 Aug 2002 @ 20:08:41 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: Fast export and Varchar
 
From:   Wayne Moran

He is a fast export that I ran. You have to cast all of your output fields to CHAR.

#--------------------------------------------------------------------------
# Execute Fast Export
#--------------------------------------------------------------------------
  echo "Begin Fast Export for ${TableName} tables..."

fexp << !
.LOGTABLE ${DBName}.${TableName};

.run file ${Logon} ;

database ${DBName} ;

.begin export
       sessions 10;

.export outfile ${DestExt}
 mode record
 format text;

select
    SLS_POS_ID            ( CHAR(4) )
   ,SLS_POS_LVL_CD        ( CHAR(2) )
   ,SLS_POS_TITL_CD       ( CHAR(3) )
   ,SLS_MGR_LVL_CD        ( CHAR(2) )
   ,SLS_MGR_TITL_CD       ( CHAR(3) )
   ,SLS_MGR_POS_ID        ( CHAR(4) )
   ,SLS_NAM_LVL_CD        ( CHAR(2) )
   ,SLS_NAM_TITL_CD       ( CHAR(3) )
   ,SLS_NAM_POS_ID        ( CHAR(4) )
   ,SLS_NAM_POS_FRST_NM   ( CHAR(20) )
   ,SLS_NAM_POS_INIT_NM   ( CHAR(1) )
   ,SLS_NAM_POS_LAST_NM   ( CHAR(25) )
   ,SLS_CHNL_ID           ( CHAR(3) )
   ,SLS_VP_LVL_CD         ( CHAR(2) )
   ,SLS_VP_TITL_CD        ( CHAR(3) )
   ,SLS_VP_POS_ID         ( CHAR(4) )
   ,SLS_VP_POS_FRST_NM    ( CHAR(20) )
   ,SLS_VP_POS_INIT_NM    ( CHAR(1) )
   ,SLS_VP_POS_LAST_NM    ( CHAR(25) )
   ,SLS_TOP_LVL_CD        ( CHAR(2) )
   ,SLS_TOP_TITL_CD       ( CHAR(3) )
   ,SLS_TOP_POS_ID        ( CHAR(4) )
   ,SLS_POS_FRST_NM       ( CHAR(20) )
   ,SLS_POS_INIT_NM       ( CHAR(1) )
   ,SLS_POS_LAST_NM       ( CHAR(25) )
from ${TableName}
order by SLS_POS_ID
;

.end export;

.logoff;
!

Wayne N. Moran



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023