Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 25 Mar 2004 @ 09:28:37 GMT


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


Subj:   Displaying long columns in BTEQ
 
From:   Ramaswamy Kalamegham

Hi All,

I have to generate a bteq report. I have a column which is Varchar(4000) which I have to print out in a report of width 120.

The column is getting truncated if the length is exceeding 120.

Currently I have worked around this problem by using case staements like below:

    (Case when character_length(field) < 120
                  then field
                  else substr(field,1,120)
         end),
        (Case when Character_length(field) < 120
                  then  ' '
                  else substr(field,121,120)
         end),
        (Case when Character_length(field) < 240
                  then ' '
                  when substr(field,241,120)
         end)

and so on.

But I have to do this for many reports and it is turning out to be very tedious. Is there a better way to achieve the desired result of automatically wrapping around the text of the column to the next line?

Ramaswamy



     
  <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