HSQL SQL insert

  • Avin

    Avin - 2013-03-06

    I am trying to insert something into HSQL DB and am running into the following issue

    insert into DATA VALUES (1001, X'4170706c654c32', '2013-06-22 15:22:40.997');

    A Raw and a Time stamp

    However this fails with the following exception

    Caused by: java.sql.SQLSyntaxErrorException: incompatible data type in conversion
        at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
        at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
        at org.hsqldb.jdbc.JDBCStatement.fetchResult(Unknown Source)
        at org.hsqldb.jdbc.JDBCStatement.execute(Unknown Source)
        at org.hibernate.tool.hbm2ddl.SchemaExport.importScript(SchemaExport.java:366)
        ... 60 more
    Caused by: org.hsqldb.HsqlException: incompatible data type in conversion
        at org.hsqldb.error.Error.error(Unknown Source)
        at org.hsqldb.error.Error.error(Unknown Source)
        at org.hsqldb.types.DateTimeType.convertToType(Unknown Source)
        at org.hsqldb.StatementDML.getInsertData(Unknown Source)
        at org.hsqldb.StatementInsert.getResult(Unknown Source)
        at org.hsqldb.StatementDMQL.execute(Unknown Source)
        at org.hsqldb.Session.executeCompiledStatement(Unknown Source)
        at org.hsqldb.Session.executeDirectStatement(Unknown Source)
        at org.hsqldb.Session.execute(Unknown Source)
  • Fred Toussi

    Fred Toussi - 2013-03-06

    Please report the CREATE TABLE statement. It seems the columns are not defined in the type used in the INSERT statement.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks