suche 36x36
  • Admin-Scout-small-Banner
           

    CURSOR Admin-Scout

    get the ultimate tool for Informix

    pfeil  
Latest versionsfixlist
14.10.xC10 FixList
12.10.xC16.X5 FixList
11.70.xC9.XB FixList
11.50.xC9.X2 FixList
11.10.xC3.W5 FixList
Have problems? - contact us.
Register for free anmeldung-x26
Contact form kontakt-x26

Informix - Problem description

Problem IT09078 Status: Closed

DOCUMENTATION IS VAGUE ON HOW TO SET A DATETIME DATATYPE WITH THE DEFAULT
CLAUSE.

product:
INFORMIX SERVER / 5725A3900 / B70 - IDS 11.70
Problem description:
Problem description 
 
Documentation is vague on how to set a DATETIME datatype with 
the 
DEFAULT Clause. 
 
 
 
To set it is needs to be written like this: 
 
datetimefield datetime year to fraction(3) default 
datetime(1971-01-01 
00:00:00.000) year to fraction(3), 
 
 
 
The documentation leads you to believe that you could use: 
 
datetimefield datetime year to fraction(3) default datetime 
'1971-01-01 
00:00:00.000' year to fraction(3) 
 
 
 
The 2nd option DOES NOT work. 
 
 
 
The error code could use some work also.  It reports an error 
201: A 
syntax error has occurred.
Problem Summary:
**************************************************************** 
* USERS AFFECTED:                                              * 
* Informix 11.70, 12.10                                        * 
**************************************************************** 
* PROBLEM DESCRIPTION:                                         * 
* See Error Description                                        * 
**************************************************************** 
* RECOMMENDATION:                                              * 
* See Problem Conclusion                                       * 
****************************************************************
Local Fix:
Solution
When you use the DEFAULT clause in a CREATE TABLE or ALTER TABLE 
statement, you can supply a literal DATETIME as a default value 
for a column. Include parentheses around the date value, for 
example: column_name DATETIME YEAR TO FRACTION(3) DEFAULT 
DATETIME(1971-01-01 00:00:00.000) YEAR TO FRACTION(3)
Workaround
not known / see Local fix
Timestamps
Date  - problem reported    :
Date  - problem closed      :
Date  - last modified       :
25.05.2015
09.06.2017
09.06.2017
Problem solved at the following versions (IBM BugInfos)
Problem solved according to the fixlist(s) of the following version(s)
Informix EditionsInformix Editions
Informix Editions
DocumentationDocumentation
Documentation
IBM NewsletterIBM Newsletter
IBM Newsletter
Current BugsCurrent Bugs
Current Bugs
Bug ResearchBug Research
Bug Research
Bug FixlistsBug Fixlists
Bug Fixlists
Release NotesRelease Notes
Release Notes
Machine NotesMachine Notes
Machine Notes
Release NewsRelease News
Release News
Product LifecycleProduct Lifecycle
Lifecycle
Media DownloadMedia Download
Media Download