<?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: ParseException line 1:162 cannot recognize input near '' '' '' in statement in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/ParseException-line-1-162-cannot-recognize-input-near-in/m-p/100051#M13065</link>
    <description>&lt;P&gt;You're saying if you put SQL statements between "with Q..." and "select *..." then you get the error?  If so can you share an example SQL statement that is between that causes the error?&lt;/P&gt;</description>
    <pubDate>Sat, 19 Dec 2015 04:49:47 GMT</pubDate>
    <dc:creator>gates</dc:creator>
    <dc:date>2015-12-19T04:49:47Z</dc:date>
    <item>
      <title>ParseException line 1:162 cannot recognize input near '' '' '' in statement</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/ParseException-line-1-162-cannot-recognize-input-near-in/m-p/100049#M13063</link>
      <description>&lt;P&gt;I am getting error when running the below query ;&lt;/P&gt;&lt;P&gt;Error occurred executing hive query: Error while compiling statement: FAILED: ParseException line 1:162 cannot recognize input near '&amp;lt;EOF&amp;gt;' '&amp;lt;EOF&amp;gt;' '&amp;lt;EOF&amp;gt;' in statement&lt;/P&gt;&lt;P&gt;With Q as (select CLAIMNUMBER,EXP_ID,EXP_COVERAGE,VEHICLE_STYLE From orc_claiminfo Where VEHICLE_STYLE != "" AND EXP_COVERAGE ="Property Damage - Vehicle Damage");&lt;/P&gt;&lt;P&gt;
select * from Q;&lt;/P&gt;&lt;P&gt;Select statement works all well, if I execute separate.&lt;/P&gt;&lt;P&gt;Anyone knows whats the issue??&lt;/P&gt;</description>
      <pubDate>Sat, 19 Dec 2015 02:30:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/ParseException-line-1-162-cannot-recognize-input-near-in/m-p/100049#M13063</guid>
      <dc:creator>colorsoflife</dc:creator>
      <dc:date>2015-12-19T02:30:02Z</dc:date>
    </item>
    <item>
      <title>Re: ParseException line 1:162 cannot recognize input near '' '' '' in statement</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/ParseException-line-1-162-cannot-recognize-input-near-in/m-p/100050#M13064</link>
      <description>&lt;P&gt;I have some finding here, if I run only the statement &lt;/P&gt;&lt;P&gt;With Q as (select CLAIMNUMBER,EXP_ID,EXP_COVERAGE,VEHICLE_STYLE From orc_claiminfo Where VEHICLE_STYLE != "" AND EXP_COVERAGE ="Property Damage - Vehicle Damage")&lt;/P&gt;&lt;P&gt;I get the error. But if I run with select * from Q, it works (below).&lt;/P&gt;&lt;P&gt;With Q as (select CLAIMNUMBER,EXP_ID,EXP_COVERAGE,VEHICLE_STYLE From orc_claiminfo Where VEHICLE_STYLE != "" AND EXP_COVERAGE ="Property Damage - Vehicle Damage")&lt;/P&gt;&lt;P&gt;select * from Q&lt;/P&gt;&lt;P&gt;But I don't want to have select immediately after getting the data set. I want to use it later. Any resolution??&lt;/P&gt;</description>
      <pubDate>Sat, 19 Dec 2015 03:00:49 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/ParseException-line-1-162-cannot-recognize-input-near-in/m-p/100050#M13064</guid>
      <dc:creator>colorsoflife</dc:creator>
      <dc:date>2015-12-19T03:00:49Z</dc:date>
    </item>
    <item>
      <title>Re: ParseException line 1:162 cannot recognize input near '' '' '' in statement</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/ParseException-line-1-162-cannot-recognize-input-near-in/m-p/100051#M13065</link>
      <description>&lt;P&gt;You're saying if you put SQL statements between "with Q..." and "select *..." then you get the error?  If so can you share an example SQL statement that is between that causes the error?&lt;/P&gt;</description>
      <pubDate>Sat, 19 Dec 2015 04:49:47 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/ParseException-line-1-162-cannot-recognize-input-near-in/m-p/100051#M13065</guid>
      <dc:creator>gates</dc:creator>
      <dc:date>2015-12-19T04:49:47Z</dc:date>
    </item>
    <item>
      <title>Re: ParseException line 1:162 cannot recognize input near '' '' '' in statement</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/ParseException-line-1-162-cannot-recognize-input-near-in/m-p/100052#M13066</link>
      <description>&lt;P&gt;Perhaps what you want is a CTAS statement not a CTE.&lt;/P&gt;&lt;PRE&gt;create table q as select CLAIMNUMBER,EXP_ID,EXP_COVERAGE,VEHICLE_STYLE from orc_claiminfo where VEHICLE_STYLE != "" AND EXP_COVERAGE = "Property Damage - Vehicle Damage"&lt;/PRE&gt;&lt;P&gt;This way you can use table q later.&lt;/P&gt;</description>
      <pubDate>Sat, 19 Dec 2015 08:44:59 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/ParseException-line-1-162-cannot-recognize-input-near-in/m-p/100052#M13066</guid>
      <dc:creator>deepesh1</dc:creator>
      <dc:date>2015-12-19T08:44:59Z</dc:date>
    </item>
    <item>
      <title>Re: ParseException line 1:162 cannot recognize input near '' '' '' in statement</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/ParseException-line-1-162-cannot-recognize-input-near-in/m-p/347854#M13067</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/41378"&gt;@colorsoflife&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Consider using CTE is possible, with the sequence as below for your references.&lt;/P&gt;&lt;P&gt;This is Hive script incorporate into Ozzie workflow.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;set hive.exec.dynamic.partition=true;
set hive.exec.dynamic.partition.mode=nonstrict;

with test_CTE as 
(select  *  from table1),

testone_CTE as
(select col1, col2, col3 from test_CTE)

insert into table mytablename partition(biz_dt)

select  col1 as name1, col2 as name2, col3 as name3 from testOne_CTE&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Jul 2022 12:34:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/ParseException-line-1-162-cannot-recognize-input-near-in/m-p/347854#M13067</guid>
      <dc:creator>newbieone</dc:creator>
      <dc:date>2022-07-17T12:34:28Z</dc:date>
    </item>
  </channel>
</rss>

