X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id B98FB3A4EF9 for ; Sat, 22 Jan 2005 15:54:56 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 56237-08 for ; Sat, 22 Jan 2005 15:54:48 +0000 (GMT) Received: from md1.psixpress.com (md1.psixpress.com [154.32.105.205]) by svr1.postgresql.org (Postfix) with ESMTP id 1AFC53A4E81 for ; Sat, 22 Jan 2005 15:54:50 +0000 (GMT) Received: from kaufbach.delug.de (pD9EB3D2B.dip0.t-ipconnect.de [217.235.61.43]) by md1.psixpress.com (MOS 3.5.6-GR) with ESMTP id CLK22113 (AUTH via LOGINBEFORESMTP); Sat, 22 Jan 2005 15:54:48 GMT Received: from kretschmer by kaufbach.delug.de with local (Exim 3.35 #1) id 1CsNcR-0001ib-00 for pgsql-sql@postgresql.org; Sat, 22 Jan 2005 16:56:11 +0100 Date: Sat, 22 Jan 2005 16:56:11 +0100 From: Kretschmer Andreas To: pgsql-sql@postgresql.org Subject: Question about a select Message-ID: <20050122155611.GA6592@kaufbach.delug.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.3.28i X-OS: Debian/GNU Linux - weil ich es mir Wert bin! X-GPG-Fingerprint: EE16 3C01 7B9C 10F7 2C8B 3B86 4DB3 D9EE 7F45 84DA X-Message-Flag: "Windows" is not the answer. "Windows" is the question and the answer is "no"! X-Lugdd: Gerd Kube X-Info: My name is root. Just root. And I am licensed to kill -9 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.05 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200501/194 X-Sequence-Number: 19982 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° ;-)