Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Wed, 04 Jan 2006 @ 12:35:09 GMT


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


Subj:   OLAP Function MAX with VARCHAR issue
 
From:   Munipandian, Madhan Kumar

Hi,

Req : To convert Rows into Columns for CHAR Attribute

When we where try to use OLAP function to get the max from CHAR/VARCHAR Attribute, we were getting

3617: Format 99999999999E999 does not match the data type


Can any one help us how to handle this

     SELECT p.party_id

            ,CASE
                 WHEN PD.DEMOG_CD ='STATUS1' THEN DEMOG_VALUE_CD
                 ELSE ''
             END STATUS1
            ,MAX(STATUS1) OVER (PARTITION BY P.PARTY_ID) MAX_STATUS1

     FROM DDEDWMIG_SBDW.PARTY P
     INNER JOIN DDEDWMIG_SBDW.PARTY_DEMOGRAPHIC  PD

     ON P.PARTY_ID = PD.PARTY_ID
     QUALIFY ALL(MAX_STATUS1,MAX_STATUS2,MAX_STATUS3,MAX_STATUS4) = 1

Thx

Madhan M



     
  <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: 27 Dec 2016