db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kent Spaulding <k...@iotabits.com>
Subject Re: Derby Syntax for (+)?
Date Wed, 18 Feb 2009 22:27:19 GMT
thanks for the quick reply - I suppose I'll try left and right outer  
joins ;-)

So (+) is shorthand, not part of the standard SQL?

--Kent

On Feb 18, 2009, at 11:24 PM, Bryan Pendleton wrote:

>> 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