Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 08 Oct 2010 @ 13:56:11 GMT


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


Subj:   Re: Sequencing SQL Queries?
 
From:   Dempsey, Mike

If you are using SQL Assistant you can use an Import file to create the reports. The Import file would consist of the 2 values required for each report, separated by a tab character. (by default)

The query would become

     Select *
     From Data as d, Fault as f
     Where d.UnitSernum = ?
           And f.UnitSernum = d.UnitSernum
           And d.timestamp <= f.eventdate
           And d.timestamp >= ?

The '?' characters will be replaced by the data values from the Import file. (You will need to enter actual date values rather than a calculation)

Eg. First record might be:

     186345    2010-04-08 12:00:00

If the event date was to be 6 months ago from today.

Note that this will write all the reports to a single file, but there will be a break/header between each one.


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