Use the correct notation for DATETIME literals:
XX_STA_DT DATETIME YEAR TO DAY DEFAULT DATETIME(1997-01-23) YEAR TO DAY,
I'd also suggest adding NOT NULL constraints to all the defaulted fields.
If the user doesn't specify a value to be inserted, then the default will
be used. If the user specifies a NULL, then NULL will be inserted (as
requested) rather than the default.
Yours,
Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>
PS: Thanks for including the version information.
}From: Bappy <msayeed@ix.netcom.com>
}Date: Thu, 23 Jan 1997 22:22:25 -0800
}X-Informix-List-Id: <news.32950>
}
}I am have problem running the following statement
}
}CREATE TABLE XX
}(
} XX_ID CHAR(30) NOT NULL,
} XX_NM CHAR(30) DEFAULT 'DEMOGRAPHICS UNAVAILABLE ',
} XX_STA_DT DATETIME YEAR TO DAY DEFAULT '1997-01-23',
} XX_MAX_PMT_AMT DECIMAL(9,0) DEFAULT -1,
} XX_INCL CHAR(1) DEFAULT 'Y'
})
};
}
} It error's out and complains that '1997-01-23' is not in a valid
}format. I gave tried a several other format's i.e. '1997/01/23'. Nothing
}seem to work.
}
} I am running this from a dbaccess session and using Informix Online
}7.1.