db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Voxland" <Nathan.Voxl...@sundog.net>
Subject Problem with default date values
Date Wed, 08 Aug 2007 21:24:25 GMT
I'm creating a table with the following SQL:

 

CREATE TABLE defaultValueTest (

id int, 

intA int, 

textA varchar(5), 

booleanA SMALLINT, 

dateA DATE, 

timeA TIME, 

datetimeA TIMESTAMP

)

 

Then running the SQL:

 

ALTER TABLE defaultValueTest ALTER COLUMN  dateA WITH DEFAULT
DATE('2007-08-09')

 

and getting the error: "An attempt was made to get a data value of type
'long' from a data value of type 'DATE'."

 

Any idea why?  dateA is defined as a "date"  and that is what the
default value is being passed in as.  Do dates not work in default
clauses?

 

Nathan


Mime
View raw message