Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 22 Oct 2002 @ 16:36:00 GMT


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


Subj:   Re: Producing large extract files
 
From:   Geoffrey Rommel

  We have a need to produce a very large, fixed length, non-delimited character data extract for input into a 3rd party product. In using BTEQ to try and accomplish this we have run into 2 problems....  



Hmm... why aren't you using FastExport? It will be much faster than BTEQ. The only difficulty might be the case expressions. By default, case expressions will return varchar columns, and they may even be Unicode rather than ASCII. You will have to cast them to fixed- length like so:

cast((case ...big long case expression... end) as char(11))


And if they're coming out as Unicode, you may want to do this:

translate(cast((case ... end) as char(11)) using Unicode_to_Latin)


Then FastExport with format binary and mode record (I'm assuming you don't care about nulls).

The only remaining problem is that each record in the exported file will have a record length on the front, which presumably you don't want since it should be the same for every record. Once you get to that point, however, it should be an easy matter to run the output through an OUTMOD or another program that would strip off the record lengths; or you could just tell your third-party product to ignore them. Come to think of it, if you write an OUTMOD, you could take the record coming from CLI and do anything you want with it.


Does this help?

--wgr



     
  <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