You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@impala.apache.org by "Kevin (Jira)" <ji...@apache.org> on 2020/05/15 13:19:00 UTC
[jira] [Created] (IMPALA-9750) Syntax error on parameterized Query
Kevin created IMPALA-9750:
-----------------------------
Summary: Syntax error on parameterized Query
Key: IMPALA-9750
URL: https://issues.apache.org/jira/browse/IMPALA-9750
Project: IMPALA
Issue Type: Bug
Components: Backend
Affects Versions: Impala 2.6.4
Reporter: Kevin
Parameterized Query Returning Syntax error on Windows 2.6.4 driver
//insert request
string insertString = "" +
" INSERT INTO request " +
" (aa_requestid, requestid, messageid, dti, prime, payloadcategory, createddate) " +
" VALUES " +
" (?, ?, ?, ?, ?, ?, ?); ";
string insertSubString = "";
OdbcCommand command = new OdbcCommand(insertString);
OdbcCommand subCommand = new OdbcCommand(insertSubString);
using (OdbcConnection connection = new OdbcConnection(SBFraudConnectionStringImpala))
{
command.Parameters.AddWithValue("@aa_requestid", Guid.NewGuid().ToString());
command.Parameters.AddWithValue("@requestid", processCreditDecisionRequest.RequestId);
command.Parameters.AddWithValue("@messageid", processCreditDecisionRequest.MessageId);
command.Parameters.AddWithValue("@dti", processCreditDecisionRequest.DTI);
command.Parameters.AddWithValue("@prime", processCreditDecisionRequest.Prime);
command.Parameters.AddWithValue("@payloadcategory", processCreditDecisionRequest.PayloadCategory);
command.Parameters.AddWithValue("@createddate", DateTime.Now.Date.ToString("yyyy-MM-dd"));
command.Connection = connection;
connection.Open();
command.ExecuteNonQuery();
StackTrace="System.Data.Odbc.OdbcException (0x80131937): ERROR [42000] [Cloudera][ImpalaODBC] (360) Syntax error occurred during query execution: [HY000] : AnalysisException: Syntax error in line 1:
...y, createddate) VALUES (?, ?, ?, ?, ?);
^
Encountered: Unexpected character
Expected: CASE, CAST, DEFAULT, EXISTS, FALSE, IF, INTERVAL, NOT, NULL, REPLACE, TRUNCATE, TRUE, IDENTIFIER
--
This message was sent by Atlassian Jira
(v8.3.4#803005)