Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 04 Jan 2008 @ 10:30:53 GMT


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


Subj:   Re: Finding previous value
 
From:   Krithiga

Hi All,

Thnx for ur suggestions,but with respect to MSTR, I need to create a view in Teradata with respect to the columns and the scenario which I had already mentioned. The report consists of the following attributes and the values must be displayed such as:

     ITEM   CURRENT EFFECTIVE DATE  CURRENT ADVC NUM  PREVIOUS EFFECTIVE DATE  PREVIOUS ADVC NUM

     278051    11/04/2007              550962              03/25/2007            519293,519284

and the records in the database are:

     item_num  advc_num  effective_date
      278051    519284     03/22/2007
      278051    519291     03/23/2007
      278051    519284     03/25/2007
      278051    519293     03/25/2007
      278051    550949     11/04/2007
      278051    550953     11/04/2007
      278051    550962     11/04/2007

Plz note tat if for a particular item,if no previous advc num exists on a particular date,then only one advc num must be displayed else all must be displayed.Accordingly i must create a view in teradata.Can someone help me out in solving this issue.


Thanks & Regards

krithiga



     
  <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