Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 13 Sep 2012 @ 13:10:30 GMT


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


Subj:   Re: Error - 3504 :- Selected non-aggregate values must be part of the associated group.
 
From:   Frydryszak, Marek

Is it really error from this query ?

It works ...

     SELECT
          NBR              (INTEGER),
          CAST ( SUBSTR ( CAST ( ENDTS AS CHAR(26) ), 1, 10)
          || '-' || SUBSTR     ( CAST ( ENDTS AS CHAR(26) ), 12, 2)
          || '.' || SUBSTR     ( CAST ( ENDTS AS CHAR(26) ), 15, 2)
          || '.' || SUBSTR     ( CAST ( ENDTS AS CHAR(26) ), 18, 9)
                               AS CHAR(26))   AS LOCENDTS,
           LOC_CD      (CHAR(01))
      FROM
          ( sel 1 nbr, timestamp '2012-03-04 12:34:56.000000' endTS, 'X' loc_cd ) a
      GROUP BY  1,2,3;


     
  <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