Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 20 Jan 2010 @ 14:51:42 GMT


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


Subj:   Re: Workaround to avoid product join
 
From:   Geoffrey Rommel

Teradata does product joins pretty well. Perhaps, instead of separate minute and second fields, the start and end times should be stored as seconds since midnight (0-86399). This will make the calculations easier.

If it is too late to change the physical tables, you could calculate those values in a derived table. Instead of "FROM Table A A", use something like this:

     FROM
      (select MINUTE_STARTING, MINUTE_ENDING, SEC_FIRST_MIN,
        SEC_LAST_MIN,
        (MINUTE_STARTING * 60) + SEC_FIRST_MIN as LOGON_SEC,
        (MINUTE_ENDING * 60) + SEC_LAST_MIN as LOGOFF_SEC, ...
        from TableA)   A

Hope this helps....



     
  <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