Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Outer Join Problem
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,
count(t.field)
from tmp_months m,
table t
where m.tag = to_char(t.date, 'MM') (+)
group by to_char(t.date, 'MM')
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Mon May 08 2000 - 00:00:00 CDT