[Q] Getting default value into D
Posted in 1997
Check the value of USEOTIME in your configuration file for Informix 7.X.
--------------------------( Forwarded letter 1 follows )---------------------
Date: Friday, 7 February 1997 8:55am
From: ian@kam.com
Subject: [Q] Getting default value into DATETIME column
Date:Fri, 7 Feb 1997 04:50:15 -0600
Reply-To: "titan" <ian@kam.com>
Organization: Kam Circuits Ltd
Sender: informix-list-owner@rmy.emory.edu
To: informix-list@rmy.emory.edu
X-Informix-List-Id: <news.33594>
Environment: RS6k F40, AIX 4.1.5, Informix SE 7.1 using Db-access.
Hi,
Can anyone suggest why the following code doesn't work as expected ? The
default value (as I see it) should contain the exact time (to the second
anyway) but actually shows 00:00. I've checked the FAQs and _have_ RTFM and
have found nothing to suggest that it should fail. The code was not
executed at midnight, BTW :-)
<input>
create table activitylog
(
actid serial,
acttask int,
acttime datetime year to second default current year to second,
actstaff int
);
insert into activitylog(acttask,actstaff) values(19,1);
select * from activitylog;<output>
actid actstaff acttime acttask
1 1 1997-02-07 00:00:00 19
TIA
Ian Bishrey