<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question ERROR [42000] [Hortonworks][Hardy] (80) Syntax or semantic analysis error thrown in server while executing query in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/ERROR-42000-Hortonworks-Hardy-80-Syntax-or-semantic-analysis/m-p/327143#M229983</link>
    <description>&lt;P&gt;C#- i am using below parameterized query for getting the data from hive&lt;/P&gt;&lt;P&gt;Query-&amp;nbsp;select * from builds_changelogs where array_contains(deliveryconstructuid,?)&lt;/P&gt;&lt;P&gt;Parameter-&lt;/P&gt;&lt;P&gt;OdbcParameter paramdc = new OdbcParameter("@deliveryconstructuid", OdbcType.NVarChar);&lt;BR /&gt;paramdc.Value = "1E4272C7D9E64DF8B3DADA3D056F35A1";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When i am executing the query it is throwing below error-&lt;/P&gt;&lt;P&gt;ERROR [42000] [Hortonworks][Hardy] (80) Syntax or semantic analysis error thrown in server while executing query. Error message from server: Error while compiling statement: FAILED: ParseException line 1:48 cannot recognize input near '?' 'and' 'array_contains' in expression specification&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 09 Oct 2021 07:01:08 GMT</pubDate>
    <dc:creator>JoshiRamesh</dc:creator>
    <dc:date>2021-10-09T07:01:08Z</dc:date>
    <item>
      <title>ERROR [42000] [Hortonworks][Hardy] (80) Syntax or semantic analysis error thrown in server while executing query</title>
      <link>https://community.cloudera.com/t5/Support-Questions/ERROR-42000-Hortonworks-Hardy-80-Syntax-or-semantic-analysis/m-p/327143#M229983</link>
      <description>&lt;P&gt;C#- i am using below parameterized query for getting the data from hive&lt;/P&gt;&lt;P&gt;Query-&amp;nbsp;select * from builds_changelogs where array_contains(deliveryconstructuid,?)&lt;/P&gt;&lt;P&gt;Parameter-&lt;/P&gt;&lt;P&gt;OdbcParameter paramdc = new OdbcParameter("@deliveryconstructuid", OdbcType.NVarChar);&lt;BR /&gt;paramdc.Value = "1E4272C7D9E64DF8B3DADA3D056F35A1";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When i am executing the query it is throwing below error-&lt;/P&gt;&lt;P&gt;ERROR [42000] [Hortonworks][Hardy] (80) Syntax or semantic analysis error thrown in server while executing query. Error message from server: Error while compiling statement: FAILED: ParseException line 1:48 cannot recognize input near '?' 'and' 'array_contains' in expression specification&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Oct 2021 07:01:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/ERROR-42000-Hortonworks-Hardy-80-Syntax-or-semantic-analysis/m-p/327143#M229983</guid>
      <dc:creator>JoshiRamesh</dc:creator>
      <dc:date>2021-10-09T07:01:08Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR [42000] [Hortonworks][Hardy] (80) Syntax or semantic analysis error thrown in server while executing query</title>
      <link>https://community.cloudera.com/t5/Support-Questions/ERROR-42000-Hortonworks-Hardy-80-Syntax-or-semantic-analysis/m-p/384371#M245352</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/92630"&gt;@JoshiRamesh&lt;/a&gt;&amp;nbsp; In your query the Question Mark (?) symbol is this a value for&amp;nbsp;&lt;SPAN&gt;deliveryconstructuid.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can you put it in double quotes and check if it works for you&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Example&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SELECT * FROM my_table&lt;BR /&gt;WHERE &lt;SPAN class="hljs-title.function"&gt;array_contains&lt;/SPAN&gt;&lt;SPAN class="hljs-params"&gt;(my_array_col, &lt;SPAN class="hljs-string"&gt;"value1"&lt;/SPAN&gt;)&lt;/SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This query will return all rows from “my_table” where “my_array_col” contains “value1”&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Feb 2024 15:47:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/ERROR-42000-Hortonworks-Hardy-80-Syntax-or-semantic-analysis/m-p/384371#M245352</guid>
      <dc:creator>jAnshula</dc:creator>
      <dc:date>2024-02-29T15:47:06Z</dc:date>
    </item>
  </channel>
</rss>

