Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 02 Dec 2005 @ 10:27:38 GMT


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


Subj:   Re: How to find the length of a Decimal field in
 
From:   McCall, Glenn David

Do you mean field or file?

If file, just do the export and look at the file size in a directory listing.

If field, the various manuals define the sizes of the fields - for example the SQL Reference data types and literals (V2R6) defines the sizes of the data types. A similar manual exists for other versions.

The utilities also generally describe the layout.

To be sure, just try doing one.

Example in bteq:

     Create table test (c1 integer);
     Insert into test values (1);

     .export data file=test.dat
     Select * from test;
     .export reset

Change the table definition as much as you like. Bear in mind that size of the exported field will differ depending upon the mode.

For example the export data will create a binary file. Integers will be 4 bytes. If you used .export report an ascii file will be created. The integers will take up as many bytes needed to display the number in ASCII.

Best idea, try it.


Hope this helps

Glenn Mc



     
  <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