Re: [sqlite] How do I create a field with default current_timestamp

2005-01-24 Thread sporkey
On Mon, Jan 24, 2005 at 09:09:29PM -, Lee Wenchian Civ AFRL/IFTC wrote: > > When creating a table, according to the syntax, a column can be specified > with DEFAULT column constraint and "The DEFAULT constraint specifies a > default value to use when doing an INSERT ...If the value is

Re: [sqlite] How do I create a field with default current_timestamp

2005-01-24 Thread Kurt Welgehausen
The date/time keywords that you're using are not implemented in the stable releases of SQLite. They're in verion 3.1 (alpha), so any day now. Regards

[Fwd: Re: [sqlite] How do I create a field with default current_timestamp]

2005-01-24 Thread Bert Verhees
sqlite> Insert into TemperatureData (tempt) values(86.0); sqlite> select * from temperaturedata; 40.2| 86|CURRENT_TIMESTAMP --- Begin Message --- Brass Tilde wrote: Create table TemperatureData ( Tempt real, TimeStamp default CURRENT_TIMESTAMP); Insert into TempertaureData values( 40.2,

Re: [sqlite] How do I create a field with default current_timestamp

2005-01-24 Thread Bert Verhees
Brass Tilde wrote: Create table TemperatureData ( Tempt real, TimeStamp default CURRENT_TIMESTAMP); Insert into TempertaureData values( 40.2, NULL); Try specifying the Tempt field and it's value only. SQLite may be interpreting the NULL as a supplied value and thus not inserting the

RE: [sqlite] How do I create a field with default current_timestamp

2005-01-24 Thread Brass Tilde
> Create table TemperatureData ( Tempt real, TimeStamp default CURRENT_TIMESTAMP); > Insert into TempertaureData values( 40.2, NULL); Try specifying the Tempt field and it's value only. SQLite may be interpreting the NULL as a supplied value and thus not inserting the default value.

Re: [sqlite] How do I create a field with default current_timestamp

2005-01-24 Thread Gwendolynn ferch Elydyr
On Mon, 24 Jan 2005, Lee Wenchian Civ AFRL/IFTC wrote: The code above creates a table storing a temperature value with the current timestamp. I would give TimeStamp a type, but I am not sure what type is appropriate (text or blob). The code as written does NOT insert the current time stamp to the

[sqlite] How do I create a field with default current_timestamp

2005-01-24 Thread Lee Wenchian Civ AFRL/IFTC
When creating a table, according to the syntax, a column can be specified with DEFAULT column constraint and "The DEFAULT constraint specifies a default value to use when doing an INSERT ...If the value is CURRENT_TIME, CURRENT_DATE or CURRENT_TIMESTAMP, then the current UTC date and/or time is