title: FAILED: ParseException line 1:0 cannot recognize input near 'hive' '-' 'e'
body: <p>I have different tables in Hive. I want to save each table in tab-separated file. How can I do it?</p>
  
  <p>If I run this command, I get an error:</p>
  
  <pre><code>hive -e 'select * from myTable' &gt; /home/mydata_tsv/myTable.tsv;
  </code></pre>
  
  <p>Error message:</p>
  
  <pre><code>NoViableAltException(26@[])
      at org.apache.hadoop.hive.ql.parse.HiveParser.statement(HiveParser.java:1084)
      at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:202)
      at org.apache.hadoop.hive.ql.parse.ParseDriver.parse(ParseDriver.java:166)
      at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:437)
      at org.apache.hadoop.hive.ql.Driver.compile(Driver.java:320)
      at org.apache.hadoop.hive.ql.Driver.compileInternal(Driver.java:1219)
      at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1260)
      at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1156)
      at org.apache.hadoop.hive.ql.Driver.run(Driver.java:1146)
      at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:217)
      at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:169)
      at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:380)
      at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:740)
      at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:685)
      at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:625)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.apache.hadoop.util.RunJar.run(RunJar.java:233)
      at org.apache.hadoop.util.RunJar.main(RunJar.java:148)
  FAILED: ParseException line 1:0 cannot recognize input near 'hive' '-' 'e'
  </code></pre>