Subject Re: [firebird-support] Re: Sql Query
Author Helen Borrie
At 12:40 PM 5/11/2003 +0000, Svein wrote:

>Mahesh,
>do as Milan advices you and use not exists. Also, alias your table, e.
>g.
>
>select column1, column2
>from table1 t1
>where <some static condition>
>and not exists (
> select * from table1 t2
> where t2.column3=t1.column3
> and <some static condition clearly referencing the the tables
>through aliases>
>)
>
>If this still does not work (it ought to work),

It won't work, because the aliasing is wrong.

select t1.column1, t1.column2
from table1 t1
where <some static condition>
and not exists (
select t2.* from table1 t2
where t2.column3=t1.column3
and <some static condition clearly referencing the tables
through aliases>
)

heLen