[ 
https://issues.apache.org/jira/browse/IMPALA-9750?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17108437#comment-17108437
 ] 

Tim Armstrong commented on IMPALA-9750:
---------------------------------------

[~maurices] this is probably a driver bug (which aren't usually tracked here) 
but maybe if you can provide a minimal reproduction we can pass it along to the 
right place.  Can you reproduce the issue with a single parameter? Or a reduced 
number of parameters. Might make it clearer which data type or whatever is 
triggering this.

> Syntax error on parameterized Query
> -----------------------------------
>
>                 Key: IMPALA-9750
>                 URL: https://issues.apache.org/jira/browse/IMPALA-9750
>             Project: IMPALA
>          Issue Type: Bug
>          Components: Clients
>    Affects Versions: Impala 2.6.4
>            Reporter: Kevin
>            Priority: Critical
>
> 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)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to