[Info-Ingres] LEFT JOIN wrong results

Self martin.bowes at ctsu.ox.ac.uk
Thu May 31 07:16:56 CDT 2007


Hi Piotr

I suspect that this is a manifestation of Bug 116668 or Bug 116611, you 
may like to check your patch for these fixes.

Martin Bowes

> There's an apparent bug in ingres version
> patch seq  version                 
> 
>  12021   1  II 9.0.4 (a64.sol/105)  
> 
> concerning outer joins.
> The first statement below returns wrong data.
> The columns involved in the joins are decimal(9, 2).
> Any comments are welcome.
> 
> 
>   1> select  first 1                                
>      p.id,                                   
>      a.procent     ,                                
>      a.fk_funduszid                                 
>      from PRODUKT_UCZESTNIKA p                      
>      LEFT JOIN OKRES o ON o.fk_produkt_uczeid=p.id  
>      LEFT JOIN ALOKACJA a ON a.fk_okresid   =o.id   
>      where        a.procent  is null                
> 
> 
> 
> 
> +----------+-------+-----------+                    
> |id        |procent|fk_funduszi|                    
> +----------+-------+-----------+                    
> |         1|       |           |                    
> +----------+-------+-----------+                    
> 
>   2> select                                   
>      p.id,                                   
>      a.procent     ,                                
>      a.fk_funduszid                                 
>      from PRODUKT_UCZESTNIKA p                      
>      LEFT JOIN OKRES o ON o.fk_produkt_uczeid=p.id  
>      LEFT JOIN ALOKACJA a ON a.fk_okresid   =o.id   
>      where 1=1                                   
>      and p.id=1                                   
> 
> 
> 
> 
> +----------+-------+-----------+                    
> |id        |procent|fk_funduszi|                    
> +----------+-------+-----------+                    
> |         1|  40,00|        163|                    
> |         1|  30,00|        164|                    
> |         1|  30,00|        161|                    
> +----------+-------+-----------+                    
> (3 rows)
> 
> 
> 
> _______________________________________________
> Info-Ingres mailing list
> Info-Ingres at kettleriverconsulting.com
> http://www.kettleriverconsulting.com/mailman/listinfo/info-ingres
> 




More information about the Info-Ingres mailing list