From: | Kretschmer Andreas <andreas_kretschmer(at)despammed(dot)com> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Question about a select |
Date: | 2005-01-22 15:56:11 |
Message-ID: | 20050122155611.GA6592@kaufbach.delug.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Hi,
I have a table with this columns: machine, date and area.
Now i need a view with machine an week, calculated from date, and
sum(area), where date between CURRENT_DATE and now+N days.
Okay, this is not the problem, it works fine.
(the original table and the view is more complex)
The problem is, i need also rows for machine and week with no entrys in
the table. For this rows the sum(area) shold be NULL ore 0.
In other words: for every machine i need M rows, and M must be constant.
Regards & Thx, Andreas
--
Diese Message wurde erstellt mit freundlicher Unterstützung eines freilau-
fenden Pinguins aus artgerechter Freilandhaltung. Er ist garantiert frei
von Micro$oft'schen Viren. (#97922 http://counter.li.org) GPG 7F4584DA
Was, Sie wissen nicht, wo Kaufbach ist? Hier: N 51.05082°, E 13.56889° ;-)
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Fuhr | 2005-01-22 19:35:39 | Re: update from multiple rows |
Previous Message | adam etienne | 2005-01-22 12:51:20 | update from multiple rows |