Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Cannot Reproduce
-
Impala 2.6.4
-
None
-
None
-
ghx-label-2
Description
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