Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Outer Join Problem . . .

Outer Join Problem . . .

From: <emaus081269_at_my-deja.com>
Date: 2000/05/08
Message-ID: <8f77bo$vnt$1@nnrp1.deja.com>#1/1

Having a problem with an outer join. Trying to get a count grouped by month from a date field on a table. Want to display 0 for months not included in the table. Created a temp table that holds each month to outer join too. But oracle does not seem to like outer joining when I am useing a function on the table I will be weak on. I can subquery this out and it works. Just want to know if anyone knows why or has a better solution.

select m.name,

      nvl(count(t.field), 0)
  from tmp_months m,

      table t
where m.tag = to_char(t.date, 'MM') (+)
group by to_char(t.date, 'MM')

This gets me a not properly ended message. Take out the outer join and all is well. Hmm . . .

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Mon May 08 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US