X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 7A3ECDA20B for ; Wed, 5 Oct 2005 12:08:34 -0300 (ADT) 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 23884-05 for ; Wed, 5 Oct 2005 15:08:31 +0000 (GMT) Received: from 137086.vserver.de (vs137086.vserver.de [62.75.137.86]) by svr1.postgresql.org (Postfix) with ESMTP id 700C5DA207 for ; Wed, 5 Oct 2005 12:08:28 -0300 (ADT) Received: from a-kretschmer.de (p54B3B034.dip0.t-ipconnect.de [84.179.176.52]) (authenticated bits=0) by 137086.vserver.de (8.12.8/8.12.8) with ESMTP id j95F8NUY031394 for ; Wed, 5 Oct 2005 17:08:23 +0200 Received: from kretschmer by a-kretschmer.de with local (Exim 3.36 #1) id 1ENAwU-0000ny-00 for pgsql-sql@postgresql.org; Wed, 05 Oct 2005 17:12:26 +0200 Date: Wed, 5 Oct 2005 17:12:26 +0200 From: Andreas Kretschmer To: pgsql-sql@postgresql.org Subject: Re: BirthDay SQL Issue Message-ID: <20051005151226.GA2744@kaufbach.delug.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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 User-Agent: mutt-ng 1.5.9i (Linux) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.05 required=5 tests=[FORGED_RCVD_HELO=0.05] X-Spam-Level: X-Archive-Number: 200510/35 X-Sequence-Number: 22888 brett schrieb: > Hi there > > This is my first posting here, please forgive me if I make any > mistakes here. > > Ok > > I have the structure > > {CLIENTS} = Client ID, First Name, Surname, DOB, Address, Home Phone > No, Mobile Phone No > > As one relation / table (There are several others in this db that are > not related to this issue) > > My problem is this > > I need to be able to select two dates on my webby so I have a range of > dates I wrote a function for me similar to your problem. You can visit it: http://a-kretschmer.de/tools/birthday.sql Maybe it is useful for you. It need one argument: a integer, and returns a list of people who has birthday between CURRENT_DATE and this+N days. Regards, Andreas -- Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. (Linus Torvalds) Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°