<?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 It is possible insert data into a table A from another B by subquery in HIVE? in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/It-is-possible-insert-data-into-a-table-A-from-another-B-by/m-p/155057#M117496</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I want execute the follow sql :&lt;/P&gt;&lt;P&gt;INSERT INTO TABLE db_h_gss.tb_h_teste_insert 
values( 
teste_2, 
teste_3,
teste_1, 
PARTITION (cod_index=1)
)
from
SELECT
CAST(teste_1 AS VARCHAR(200)), 
CAST(teste_2  AS VARCHAR(200)), 
CAST(teste_3 AS VARCHAR(200)), 
FROM db_h_gss.tb_h_teste_orig
limit 10;&lt;/P&gt;&lt;P&gt;It's possible, insert with subquery? This command doesnt work, i tried many ways and none worked.&lt;/P&gt;&lt;P&gt;This is the create table (destination)&lt;/P&gt;&lt;P&gt;CREATE TABLE db_h_gss.tb_h_teste_insert
(teste_1 VARCHAR(200), 
teste_2 VARCHAR(200), 
teste_3 VARCHAR(200) 
) PARTITIONED BY(cod_index int )
STORED AS ORC;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Wed, 18 May 2016 23:53:03 GMT</pubDate>
    <dc:creator>getterf</dc:creator>
    <dc:date>2016-05-18T23:53:03Z</dc:date>
  </channel>
</rss>

