Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Sat, 04 Dec 2004 @ 10:06:24 GMT


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


Subj:   COALESCE() Troubles
 
From:   Anomy Anom

<-- Anonymously Posted: Friday, December 03, 2004 19:13 -->

Howdy all,

I'm getting a "3800: DataType mismatch in THEN/ELSE expression" error, on my COALESCE part of a query.

The problem query is similar to this:

     SELECT
       A.PI_Column1
       ,A.PI_Column2
       ,COALESCE( MIN( B.CHAR_20_FIELD ), 'String Literal')  AS Attrib1
     FROM
       DB.Table  A
     LEFT OUTER JOIN
       DB.Table  B
     ON (A.PI_Column1 = B.PI_Column1
     AND A.PI_Column2 = B.PI_Column2)
     GROUP BY 1,2,3
     ;

Any insights as to why COALESCE does not like my MIN()? I can't find the SQL right now, but I'm sure I've done this MIN() logic in a COALESCE before.


Thanks,

Anomy



     
  <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