My Application is using Apache Derby 10.1.3.2 and it needs to insert current time stamp value to a column which is a BIGINT ( it can also be SMALLINT, INTEGER or DECIMAL) datatype.
According to http://db.apache.org/derby/docs/10.2/ref/rrefsqlj33562.html time stamp value can't directly converted to BIGINT.So first I convert that to CHAR and then try to convert that to BIGINT. But it gave the following error ERROR 22018: Invalid character string format for type BIGINT. SQL scripts used to this is in ij are given below ij> CREATE TABLE Testtime ( username VARCHAR(64) NOT NULL , timestamp BIGINT NOT NULL , CONSTRAINT Testtime_PK PRIMARY KEY (username) ); 0 rows inserted/updated/deleted ij> INSERT INTO Testtime (username, timestamp) VALUES ('testusername', CAST( CAST (CURRENT_TIMESTAMP AS CHAR(100)) AS BIGINT) ); ERROR 22018: Invalid character string format for type BIGINT. Is there a way to do that in Derby 10.1.3.2 -- View this message in context: http://www.nabble.com/Need-to-convert-CURRENT_TIMESTAMP-value-to-BIGINT-tp14660378p14660378.html Sent from the Apache Derby Users mailing list archive at Nabble.com.
