3 Replies Latest reply on Nov 26, 2018 9:17 AM by Steven Hawkins

    Unable to set value for YEAR datatype in MySQL.

    Manoj Majumdar Newbie

      I am trying to insert data into a column of type "YEAR" in a table in MySQL database using Teiid.

      When I try to string in the year field it gives me the following error :-

      Caused by: org.teiid.core.TeiidProcessingException: TEIID30082 Remote org.teiid.api.exception.query.QueryResolverException: TEIID30082 Expected value of type 'date' but ''2019'' is of type 'string' and no implicit conversion is available.


      So I tried to insert an object of java.sql.date with the date 2018-05-05. This time I got the following error :-

      Caused by: java.sql.SQLException: Remote java.sql.SQLException: Data truncated for column 'year' at row 1