<?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: 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/155064#M117503</link>
    <description>&lt;P&gt;i will try explain what i want.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;case 1:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;INSERT INTO TABLE db_h_gss.tb_h_teste_insert &lt;/P&gt;&lt;P&gt;PARTITION (cod_index=1) &lt;/P&gt;&lt;P&gt;SELECT &lt;/P&gt;&lt;P&gt;CAST(teste_1 AS VARCHAR(200)), CAST(teste_2  AS VARCHAR(200)), CAST(teste_3 AS VARCHAR(200)) &lt;/P&gt;&lt;P&gt;FROM db_h_gss.tb_h_teste_orig;&lt;/P&gt;&lt;P&gt;This command works, but i cant see  which column "teste_1"(tb_h_teste_orig) corresponds in target table(tb_h_teste_insert)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;case 2 :&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;INSERT INTO TABLE db_h_gss.tb_h_teste_insert &lt;/P&gt;&lt;P&gt;
values( &lt;/P&gt;&lt;P&gt;
teste_1, teste_2, teste_3, PARTITION (cod_index=1)&lt;/P&gt;&lt;P&gt;
) &lt;/P&gt;&lt;P&gt;from &lt;/P&gt;&lt;P&gt;SELECT &lt;/P&gt;&lt;P&gt;CAST(teste_1 AS VARCHAR(200)), &lt;/P&gt;&lt;P&gt;
CAST(teste_2  AS VARCHAR(200)), &lt;/P&gt;&lt;P&gt;
CAST(teste_3 AS VARCHAR(200))&lt;/P&gt;&lt;P&gt;
FROM db_h_gss.tb_h_teste_orig ;&lt;/P&gt;&lt;P&gt;This command doesnt work, but, you can see that i'm trying insert in "teste_1"(target table) the column "teste_1" from tb_h_teste_orig.&lt;/P&gt;&lt;P&gt;Sorry my english, but my spanish is worse.&lt;/P&gt;&lt;P&gt;thanks again&lt;/P&gt;</description>
    <pubDate>Thu, 19 May 2016 01:36:44 GMT</pubDate>
    <dc:creator>getterf</dc:creator>
    <dc:date>2016-05-19T01:36:44Z</dc:date>
  </channel>
</rss>

