Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 17 Feb 2011 @ 20:32:19 GMT


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


Subj:   Re: Report from dbc.qrylog by MONTH using SQL
 
From:   Dempsey, Mike

You could use a range of 1 year and sort by date - then manually add breaks between the months.

Alternatively you can run 12 separate queries.

If you use Export to write the output directly to a file you would need to select the option to write all output to one file, and maybe include the option to write the SQL and result (success code and row count) to the file to act as breaks between months.

The third option would be to use Import to read the 12 start/end dates from a file and just issue the single query:

     Sel * From  dbc.qrylog
     Where CollectTimeStamp Between ? and ?;

This will write all output to a single file (same name as the import file but with a '.log' suffix added) with breaks between each record set that display the first parameter value from that import record. In your case:

     2010-01-01 00:00:01
     2010-02-01 00:00:01
     Etc.

Mike Dempsey
Teradata Client Tools



     
  <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