Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 14 Jun 2002 @ 13:54:45 GMT


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


Subj:   Re: OUTER JOIN and COALESCE
 
From:   Dieter N�th

Hi Jiri,

i don't know if it's really a bug, i would expect that behaviour (and MS SQL Server 2k works the same). Maybe you should ask in comp.databases (or comp.databases.theory IIRC) for that - probably Joe Celko will answer it, he's one of the guys who created ANSI SQL ;- )

To get the expected result set use a derived table:

select T_1.Id_1, T_1.Desc_1, V_2.V_Id_2, V_2.V_Desc_2
from T_1 left join (select
coalesce(Id_2,Id_2,0) as V_Id_2,
coalesce(Desc_2,Desc_2,'Error') as V_Desc_2
from T_2)V_2 on T_1.Id_1 = V_2.V_Id_2
order by 1;



     
  <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