Re: Default value
Posted in 1997
Kathy Myers <kathy@nvolve.com> wrote: :OK, all I'm trying to do is set a default DATETIME value for :current + 30 days. Can't get the table to create. Must be :missing something. Anyone know what it might be? Yes: 1. The version of the database you are using. 2. The actual create table statement you have written. Going from the above it seems you want something like: create table( datetimecolumn datetime year to minute default current + 30 units days ) But RTFM on the default clause in the SQL Syntax manual (page 1-107 in the version I look at right now which is for OnLine 7.2 on NT) there is no mention of beeing able to add something to the current value. When it isn't specified it isn't part of the leagal syntax. Sadly it isn't possible to do this via a trigger/stored procedure either. You will have to do it in your application. Nils.Myklebust@idg.no NM Data AS, P.O.Box 9090 Gronland, N-0133 Oslo, Norway My opinions are those of my company The Informix FAQ is at http://www.iiug.org