You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@impala.apache.org by "CWYU (Jira)" <ji...@apache.org> on 2022/08/09 04:01:00 UTC

[jira] [Created] (IMPALA-11486) Syntax error on parameterized Query

CWYU created IMPALA-11486:
-----------------------------

             Summary: Syntax error on parameterized Query
                 Key: IMPALA-11486
                 URL: https://issues.apache.org/jira/browse/IMPALA-11486
             Project: IMPALA
          Issue Type: Bug
          Components: Clients
    Affects Versions: Impala 2.9.0
         Environment: windows10 odbc driver 2.6.16
            Reporter: CWYU


I have an issue the same as [IMPALA-9750] Syntax error on parameterized Query - ASF JIRA (apache.org)
h2. _ERROR [42000] [Cloudera][ImpalaODBC] (360) Syntax error occurred during query execution: [HY000] : AnalysisException: Syntax error in line 1:_
_...lt.fdc_lot_run where eqid=? and year=2021 and month=10..._
                            _^_
_Encountered: Unexpected character_
_Expected: CASE, CAST, DEFAULT, EXISTS, FALSE, IF, INTERVAL, NOT, NULL, REPLACE, TRUNCATE, TRUE, IDENTIFIER_

_CAUSED BY: Exception: Syntax error_

 

_dev environment_
 * _windows 10_
 * _.net framework C# 4.8_
 * _impala odbc driver 2.6.16_

 

_test code_

   var command = (System.Data.Odbc.OdbcCommand)conn.CreateCommand();
                command.CommandText = "select * from default.fdc_lot_run where eqid=? and year=2021 and month=10 and day=15";
                command.Parameters.Add("eqid", System.Data.Odbc.OdbcType.VarChar).Value = "CACMPW01";

                var rs = command.ExecuteReader(); // here exception...
                var x = rs.Read();
                rs.Close();

 

I test normal query without parameter is OK, but failed in parameterized query.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)