You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "niklaus xiao (JIRA)" <ji...@apache.org> on 2016/07/06 00:43:10 UTC

[jira] [Commented] (HIVE-14081) Appending a variable value into the hive query inside java code gives me an error

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

niklaus xiao commented on HIVE-14081:
-------------------------------------

Try this:
{code}
res=stm.executeQuery("select * from dataset where c_name = '"+jComboBox1.getSelectedItem() + "'");
{code}

> Appending a variable value into the hive query inside java code gives me an error
> ---------------------------------------------------------------------------------
>
>                 Key: HIVE-14081
>                 URL: https://issues.apache.org/jira/browse/HIVE-14081
>             Project: Hive
>          Issue Type: Bug
>          Components: API
>    Affects Versions: 0.13.0
>            Reporter: Amey D
>
> New to this forum please help or guide me where do i find the solution to this error.
> Query inside java :
>  res=stm.executeQuery("select * from dataset where c_name = "+jComboBox1.getSelectedItem());
> Error :
> FAILED: SemanticException [Error 10004]: Line 1:35 Invalid table alias or column reference 'AAPL': (possible column names are:
> Cannot get over this issue.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)