db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John English <john.fore...@gmail.com>
Subject Re: SQL: JOIN syntax
Date Mon, 19 Nov 2012 09:48:18 GMT
On 19/11/2012 10:36, Knut Anders Hatlen wrote:
> Hi John,
>
> You could try CROSS JOIN:
>
> SELECT * from a CROSS JOIN b LEFT JOIN c ON a.foo=c.foo AND b.bar=c.bar

Perfect, thank you very much! I bodged it meanwhile with

   SELECT * from (SELECT * FROM a,b) AS s LEFT JOIN c
   ON s.foo=c.foo AND s.bar=c.bar

but I knew there must be a better way!
-- 
John English

Mime
View raw message