2 Replies Latest reply on Feb 16, 2016 3:51 PM by Gabriel Steinberg

    Teiid drops VARCHAR length, causing an HSQL syntax error

    Gabriel Steinberg Newbie

      When running the following query through Teiid:

          SELECT CAST(N_NATIONKEY AS VARCHAR(100)) FROM NATION

       

      against an HSQL database, Teiid drops the length from the query, sending to HSQL the query

          SELECT CAST(N_NATIONKEY AS VARCHAR) FROM NATION

      which causes an HSQL syntax error (it doesn't support VARCHAR without length).

       

      When running the same query against Oracle, the query it creates is

          SELECT SELECT to_char(N_NATIONKEY) FROM NATION

      which works, but doesn't alter the field length.

       

      Does anyone know if there is a way around this?

       

      Thanks,

      Gabi Steinberg.