db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Pendleton <bpendle...@amberpoint.com>
Subject Re: Derby Syntax for (+)?
Date Wed, 18 Feb 2009 22:24:22 GMT
> select distinct o.d, o.u, o.e
>   from my_table o, my_table_2 t
>  where o.u = t.u(+)
>    and t.u is null
>    and o.u not like 'P%';
> 
> This fails with a syntax error - on the (+) on line 3 of the SQL - 
> what's the corresponding Derby syntax?

Looks like you may be trying to write an outer join. You can
find the Derby syntax for outer joins documented here:
http://db.apache.org/derby/docs/10.4/ref/rrefsqlj18922.html

I think you'll want something like

  select distinct o.d, o.u, o.e
    from my_table o left outer join my_table_2 t on o.u = t.u
   where t.u is null and o.u not like 'P%';

thanks,

bryan


Mime
View raw message