Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 23 Mar 2006 @ 11:09:54 GMT


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


Subj:   Re: Use of Ordered Analytical Functions
 
From:   Anomy Anom

<-- Anonymously Posted: Thursday, March 23, 2006 04:37 -->

Dieter wrote:

    > select col1, col2, col3, col4, ....... , col13,
    >       (case when col4 <>
    >               min(col4) over (partition by col1, col2 order by col3
    >                   rows between 1 preceding and 1 preceding)
    >           then 1
    >           else 0
    >         end
    >        ) +
    > ...
    > from tableA cur
  But i don't know if "order by col3" retrieves the same result set...  


This soln. works fine with our test data, but it's impossible to gauge any performance benefit (if any) with the small volumes. I'll post the results when we have a chance to run against larger volumes. using or not using order by col3.... doesn't make any difference to the result in the test data, again I'll check this out with real data.

Once again, thanks for all the help....



     
  <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