Actually, if you had looked too much before your first post you would not have found it. This section was added with revision 2 of the FAQ (because of the number of people needing assistance in this area) and that has only been available since 2/24.

Piet Blok wrote:

Thank you for the pointer Stanley, I should ofcourse have looked there in the first place. I read it now and I think it does not look too complicated.
Piet Blok
----- Original Message -----


    *From:* Stanley Bradbury <mailto:[EMAIL PROTECTED]>
    *To:* Derby Discussion <mailto:[email protected]>
    *Sent:* Thursday, March 03, 2005 12:45 AM
    *Subject:* Re: DATE manipulation

    Hi -
    See the section /"How do I perform date arithmetic in
    Derby/Cloudscape?"  /in the FAQ document at:
    
http://www-128.ibm.com/developerworks/db2/library/techarticle/dm-0408bradbury/

    Once an /addMonth/ function is created and defined in the DB as
    described in the FAQ it can be referenced in a column default.

    Piet Blok wrote:

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/0211yip3.html
Is there any other way to default to a month from now?
Piet Blok






Reply via email to