Re: Outer join

From: Dan Blum <>
Date: Thu, 18 Sep 2008 00:49:48 +0000 (UTC)
Message-ID: <gas8jc$5mp$> wrote:

> Hi,

> This is simple, at least for others. What's wrong with this? It only
> returns the rows in the fund_daily_prices table.....not all the ones
> in fund_rank which have no matching in fund_daily_prices .

> SELECT fund_rank.idnum
> FROM fund_rank LEFT OUTER JOIN fund_daily_prices ON fund_rank.idnum =
> fund_daily_prices.idnum
> WHERE seq_no > 0
> AND seq_no <= 50 ORDER BY seq_no;

What table is the seq_no column in? If it's in fund_daily_prices, you need to account for it being NULL.

Dan Blum					
"I wouldn't have believed it myself if I hadn't just made it up."
Received on Wed Sep 17 2008 - 19:49:48 CDT

Original text of this message