Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id E7B9F9FB2A6 for ; Wed, 8 Nov 2006 21:24:27 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 46500-05 for ; Thu, 9 Nov 2006 01:24:19 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from web33310.mail.mud.yahoo.com (web33310.mail.mud.yahoo.com [68.142.206.125]) by postgresql.org (Postfix) with SMTP id 18AE39FB2A1 for ; Wed, 8 Nov 2006 21:24:18 -0400 (AST) Received: (qmail 34767 invoked by uid 60001); 9 Nov 2006 01:24:17 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=h61CzmflhyltYYTHZwEXsm0Ge8cWn958oHaaAnxnFSrRO1JbMtmmWrc8VNYswEzPZ6B/pPNIy7/uxrCXXNf93JpwnV59wObLakbQAZ/iNZLVgvuZX86NZzOkdTuUagqp+x92ag947VjebWFN3SilSiuH1N+JtEcZfCbLD0liyw8= ; Message-ID: <20061109012417.34765.qmail@web33310.mail.mud.yahoo.com> Received: from [12.9.179.126] by web33310.mail.mud.yahoo.com via HTTP; Wed, 08 Nov 2006 17:24:17 PST Date: Wed, 8 Nov 2006 17:24:17 -0800 (PST) From: Subject: Re: [SQL] [ADMIN] Is there anyway to... To: "pgsql-general@postgresql.org" In-Reply-To: <20061108061336.GV90133@nasby.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.717 tagged_above=0 required=5 tests=BAYES_00, DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST, DNS_FROM_RFC_WHOIS, NO_REAL_NAME X-Spam-Level: * X-Archive-Number: 200611/472 X-Sequence-Number: 103568 > While you could setup a cron job to decrement some > counter every day, I > think that's not the best approach. Instead, I'd run > a query once a day > that finds all students that are past-due and takes > some kind of action. > -- > Jim Nasby > jim@nasby.net > EnterpriseDB http://enterprisedb.com > 512.569.9461 (cell) > > ---------------------------(end of > broadcast)--------------------------- > TIP 5: don't forget to increase your free space map > settings i'm wanting to learn something here so i'm going to chime in. the way i read what you are saying is that you'd have start_date and number_days columns in your table. each day a query would run and pull the start_date and numbers_days columns. the application (or postgresql function) would then take the current date, subtract starte date and compare it to number of days. if it is above that number, the code will take some sort of action. is that about it or have i missed something? tia... ____________________________________________________________________________________ Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail. http://new.mail.yahoo.com