Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 92707 invoked from network); 26 Feb 2005 13:46:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 26 Feb 2005 13:46:16 -0000 Received: (qmail 69363 invoked by uid 500); 26 Feb 2005 13:46:15 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 69341 invoked by uid 500); 26 Feb 2005 13:46:14 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 69327 invoked by uid 99); 26 Feb 2005 13:46:14 -0000 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,HTML_50_60,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from smtp04.wanadoo.nl (HELO smtp04.wanadoo.nl) (194.134.35.144) by apache.org (qpsmtpd/0.28) with ESMTP; Sat, 26 Feb 2005 05:46:13 -0800 Received: from DB35TT0J (c53755738.cable.wanadoo.nl [83.117.87.56]) by smtp4.wanadoo.nl (Postfix) with SMTP id 628071897 for ; Sat, 26 Feb 2005 14:46:10 +0100 (CET) Message-ID: <000601c51c09$8a725800$38577553@DB35TT0J> From: "Piet Blok" To: "Derby Discussion" Subject: DATE manipulation Date: Sat, 26 Feb 2005 14:46:15 +0100 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0003_01C51C11.EC288F30" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. ------=_NextPart_000_0003_01C51C11.EC288F30 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Since I am not an expert on databases I am just experimenting a bit in = which Derby comes in very handy. I am trying to create a table and set a default value for one of the = columns that should be one month from now, like this: Plan_Date Date NOT NULL DEFAULT CURRENT_DATE + 1 MONTH, This is not accepted. I got the idea from a site on DB2 (I hoped DB2 and = Derby share the same features) = http://www-106.ibm.com/developerworks/db2/library/techarticle/0211yip/021= 1yip3.html Is there any other way to default to a month from now? Piet Blok ------=_NextPart_000_0003_01C51C11.EC288F30 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Since I am not an expert on databases I = am=20 just experimenting a bit in which Derby comes in very = handy.
 
I am trying to create a table and set a = default=20 value for one of the columns that should be one month from now, = like=20 this:

Plan_Date Date NOT NULL DEFAULT CURRENT_DATE + 1 = MONTH,

This is not accepted. I got the idea from a site on DB2 (I hoped = DB2 and=20 Derby share the same features) http://www-106.ibm.com/developerworks/db2/library/tec= harticle/0211yip/0211yip3.html
 
Is there any other way to default to a month from now?
 
Piet Blok
------=_NextPart_000_0003_01C51C11.EC288F30--