Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 04 Feb 2004 @ 18:42:12 GMT


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


Subj:   Re: How to print heading one time only in a BTEQ query?
 
From:   Scott Thompson

  So, how will you get customer names into the heading at all?  



this is how to dynamically change the heading contents during the course of a query using bteq :

.set pagebreak on 1;
.set omit on 1;
.set heading 'YTD PURCHASES FOR CUSTOMER &1';

SELECT CUSTOMER_NAME,
       ....
FROM PURCHASES_TABLE

note especially the "&1" in the heading - this tells teradata to substitute in the VALUE of the first column that is at the top of the page the heading is going to print on. the pagebreak ensures that only a given customers data is on any given page and the omit ensures that the customer's name does not unnecessarily appear in both the data as well as in the heading.


  you could just include customer_name as one of the columns in >> your report and use SUPPRESS on it  


thanks for the suggestion, but that still won't work. the split out utility i am using looks for the customer in the first line of the heading.


thanks,

-scott t.



     
  <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