<?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 Re: Impala ODBC driver returned an error (SQLExecDirectW) in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Impala-ODBC-driver-returned-an-error-SQLExecDirectW/m-p/339094#M233031</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/11191"&gt;@araujo&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried the query you wrote and unfortunately I'm getting the same mistake, just on the last line.&lt;/P&gt;</description>
    <pubDate>Tue, 22 Mar 2022 09:09:15 GMT</pubDate>
    <dc:creator>Katja</dc:creator>
    <dc:date>2022-03-22T09:09:15Z</dc:date>
    <item>
      <title>Impala ODBC driver returned an error (SQLExecDirectW)</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Impala-ODBC-driver-returned-an-error-SQLExecDirectW/m-p/338924#M232971</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm having a problem with&amp;nbsp;ClouderaImpalaODBC64.dll version 2.16.14.1016.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;SQLExecDirectW&lt;/STRONG&gt;&amp;nbsp;function returns an error when executing the following query:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;EM&gt;With variable1 as&lt;/EM&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;EM&gt;(&lt;/EM&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;EM&gt;SELECT orders.order_id, orders.order_date&lt;/EM&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;EM&gt;FROM quest_stage.orders orders&lt;/EM&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;EM&gt;WHERE orders.order_date = (CAST(? AS TIMESTAMP))&lt;/EM&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;EM&gt;Select * from variable1&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Error details:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;[Cloudera][ImpalaODBC] (110) Error while executing a query in Impala: [HY000]: ParseException: Syntax error in line 5&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It seems to be the problem when you combine &lt;STRONG&gt;WITH&lt;/STRONG&gt; and &lt;STRONG&gt;CAST&lt;/STRONG&gt; keywords.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Both of the following queries below work:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;EM&gt;SELECT orders.order_id, orders.order_date&lt;/EM&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;EM&gt;FROM quest_stage.orders orders&lt;/EM&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;EM&gt;WHERE orders.order_date = (CAST(? AS TIMESTAMP))&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;----------------------------------------------------------------------------------------------&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;EM&gt;With variable1 as&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;(&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;SELECT orders.order_id, orders.order_date&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;FROM quest_stage.orders orders&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Select * from variable1&lt;/EM&gt;&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you help me understand what seems to be the problem here and is there any solution to this problem?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Apr 2026 07:59:18 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Impala-ODBC-driver-returned-an-error-SQLExecDirectW/m-p/338924#M232971</guid>
      <dc:creator>Katja</dc:creator>
      <dc:date>2026-04-21T07:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: Impala ODBC driver returned an error (SQLExecDirectW)</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Impala-ODBC-driver-returned-an-error-SQLExecDirectW/m-p/339002#M232992</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/96558"&gt;@Katja&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CAST is supported in impala and hive, you said the query works where have you tested it. Can you try running on beeline and see if it works.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Mar 2022 10:46:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Impala-ODBC-driver-returned-an-error-SQLExecDirectW/m-p/339002#M232992</guid>
      <dc:creator>HanzalaShaikh</dc:creator>
      <dc:date>2022-03-21T10:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: Impala ODBC driver returned an error (SQLExecDirectW)</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Impala-ODBC-driver-returned-an-error-SQLExecDirectW/m-p/339066#M233014</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/96558"&gt;@Katja&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not totally sure but it may be possible that bind variables are accepted inside WITH clauses. Would you be able to try the alternative below?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;With variable1 as
(
SELECT orders.order_id, orders.order_date
FROM quest_stage.orders orders
)
Select *
from variable1
WHERE order_date = (CAST(? AS TIMESTAMP))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;André&lt;/P&gt;&lt;P&gt;&lt;EM&gt;--&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;Was your question answered? Please take some time to click on "&lt;STRONG&gt;Accept as Solution&lt;/STRONG&gt;" below this post.&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;If you find a reply useful, say thanks by clicking on the thumbs up button.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Mar 2022 22:23:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Impala-ODBC-driver-returned-an-error-SQLExecDirectW/m-p/339066#M233014</guid>
      <dc:creator>araujo</dc:creator>
      <dc:date>2022-03-21T22:23:08Z</dc:date>
    </item>
    <item>
      <title>Re: Impala ODBC driver returned an error (SQLExecDirectW)</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Impala-ODBC-driver-returned-an-error-SQLExecDirectW/m-p/339094#M233031</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/11191"&gt;@araujo&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried the query you wrote and unfortunately I'm getting the same mistake, just on the last line.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2022 09:09:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Impala-ODBC-driver-returned-an-error-SQLExecDirectW/m-p/339094#M233031</guid>
      <dc:creator>Katja</dc:creator>
      <dc:date>2022-03-22T09:09:15Z</dc:date>
    </item>
    <item>
      <title>Re: Impala ODBC driver returned an error (SQLExecDirectW)</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Impala-ODBC-driver-returned-an-error-SQLExecDirectW/m-p/339096#M233032</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/77252"&gt;@HanzalaShaikh&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm not having problem with only CAST, as you can see from the second query I wrote, second and third query from my original post works fine. Only combination of CAST and WITH is giving me this error. I'm new with Impala and I haven't use Beeline before (I'll google it though, tnx).&lt;/P&gt;</description>
      <pubDate>Tue, 22 Mar 2022 09:19:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Impala-ODBC-driver-returned-an-error-SQLExecDirectW/m-p/339096#M233032</guid>
      <dc:creator>Katja</dc:creator>
      <dc:date>2022-03-22T09:19:04Z</dc:date>
    </item>
  </channel>
</rss>

