You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Srinivas Thunga <sr...@gmail.com> on 2015/02/26 13:34:47 UTC

column selection for insert

Hi,

I am using Hive 0.14

Can any one help me on to execute the below type query

insert into table emp (eid,ename) select * from dept where emp.id = dept.id




*Thanks & Regards,*

*Srinivas T*

Re: column selection for insert

Posted by Srinivas Thunga <sr...@gmail.com>.
Hi,

Then is there any way to achieve this?


*Thanks & Regards,*

*Srinivas T*

On Fri, Feb 27, 2015 at 9:53 AM, Siddharth Tiwari <siddharth.tiwari@live.com
> wrote:

> Not yet !
>
> Sent from my iPhone
>
> On Feb 26, 2015, at 8:23 PM, Srinivas Thunga <sr...@gmail.com>
> wrote:
>
> Hi,
>
> Thanks for the prompt response.
>
> Cann't i insert specific columns which i want?
>
> Like we do in oracle.
>
> *Thanks & Regards,*
>
> *Srinivas T*
>
> On Thu, Feb 26, 2015 at 8:55 PM, Alan Gates <al...@gmail.com> wrote:
>
>> Specifying which columns in the target table to insert into (emp in your
>> case) is not supported in 0.14.  You have to insert into all the columns in
>> the table and they have to match the order of items in the select or values
>> clause.
>>
>> This will be supported in 1.2.
>>
>> Alan.
>>
>>  <compose-unknown-contact.jpg>
>>  Srinivas Thunga <sr...@gmail.com>
>>  February 26, 2015 at 4:34
>> Hi,
>>
>> I am using Hive 0.14
>>
>> Can any one help me on to execute the below type query
>>
>> insert into table emp (eid,ename) select * from dept where emp.id =
>> dept.id
>>
>>
>>
>>
>> *Thanks & Regards,*
>>
>> *Srinivas T*
>>
>>
>

Re: column selection for insert

Posted by Siddharth Tiwari <si...@live.com>.
Not yet ! 

Sent from my iPhone

> On Feb 26, 2015, at 8:23 PM, Srinivas Thunga <sr...@gmail.com> wrote:
> 
> Hi,
> 
> Thanks for the prompt response.
> 
> Cann't i insert specific columns which i want?  
> 
> Like we do in oracle.
> 
> Thanks & Regards,
> 
> Srinivas T
> 
>> On Thu, Feb 26, 2015 at 8:55 PM, Alan Gates <al...@gmail.com> wrote:
>> Specifying which columns in the target table to insert into (emp in your case) is not supported in 0.14.  You have to insert into all the columns in the table and they  have to match the order of items in the select or values clause.  
>> 
>> This will be supported in 1.2.
>> 
>> Alan.
>> 
>>> <compose-unknown-contact.jpg>	Srinivas Thunga	February 26, 2015 at 4:34
>>> Hi,
>>> 
>>> I am using Hive 0.14
>>> 
>>> Can any one help me on to execute the below type query
>>> 
>>> insert into table emp (eid,ename) select * from dept where emp.id = dept.id
>>> 
>>> 
>>> 
>>> 
>>> Thanks & Regards,
>>> 
>>> Srinivas T
> 

Re: column selection for insert

Posted by Srinivas Thunga <sr...@gmail.com>.
Hi,

Thanks for the prompt response.

Cann't i insert specific columns which i want?

Like we do in oracle.

*Thanks & Regards,*

*Srinivas T*

On Thu, Feb 26, 2015 at 8:55 PM, Alan Gates <al...@gmail.com> wrote:

> Specifying which columns in the target table to insert into (emp in your
> case) is not supported in 0.14.  You have to insert into all the columns in
> the table and they have to match the order of items in the select or values
> clause.
>
> This will be supported in 1.2.
>
> Alan.
>
>   Srinivas Thunga <sr...@gmail.com>
>  February 26, 2015 at 4:34
> Hi,
>
> I am using Hive 0.14
>
> Can any one help me on to execute the below type query
>
> insert into table emp (eid,ename) select * from dept where emp.id =
> dept.id
>
>
>
>
> *Thanks & Regards,*
>
> *Srinivas T*
>
>

Re: column selection for insert

Posted by Alan Gates <al...@gmail.com>.
Specifying which columns in the target table to insert into (emp in your 
case) is not supported in 0.14.  You have to insert into all the columns 
in the table and they have to match the order of items in the select or 
values clause.

This will be supported in 1.2.

Alan.

> Srinivas Thunga <ma...@gmail.com>
> February 26, 2015 at 4:34
> Hi,
>
> I am using Hive 0.14
>
> Can any one help me on to execute the below type query
>
> insert into table emp (eid,ename) select * from dept where emp.id 
> <http://emp.id> = dept.id <http://dept.id>
>
>
>
>
> /Thanks & Regards,/
> /
> /
> /Srinivas T/