You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Renuka Be <re...@gmail.com> on 2015/06/18 07:14:34 UTC

Query in column name

Hi Folks,

I have tried column name like (Order Details) with space, it cause error.
Is there any way to mention column name with sapce.

Regards,
Renuka N

Re: Query in column name

Posted by Renuka Be <re...@gmail.com>.
Hi 김영우,

Thanks for your reply. It work for me.

Regards,
Renuka N

On Thu, Jun 18, 2015 at 4:31 AM, 김영우 <wa...@gmail.com> wrote:

> If you are running Hive .13+, use *backticks*.
>
> {quote}
> > create table x (`col name` string);
> No rows affected (0.148 seconds)
> > select `col name` from x;
>
> {quote}
>
> You can refer to Hive wiki for details,
> https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL
>
> HTH,
> Youngwoo
>
> On Thu, Jun 18, 2015 at 2:14 PM, Renuka Be <re...@gmail.com> wrote:
>
>> Hi Folks,
>>
>> I have tried column name like (Order Details) with space, it cause error.
>> Is there any way to mention column name with sapce.
>>
>> Regards,
>> Renuka N
>>
>
>

Re: Query in column name

Posted by 김영우 <wa...@gmail.com>.
If you are running Hive .13+, use *backticks*.

{quote}
> create table x (`col name` string);
No rows affected (0.148 seconds)
> select `col name` from x;

{quote}

You can refer to Hive wiki for details,
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL

HTH,
Youngwoo

On Thu, Jun 18, 2015 at 2:14 PM, Renuka Be <re...@gmail.com> wrote:

> Hi Folks,
>
> I have tried column name like (Order Details) with space, it cause error.
> Is there any way to mention column name with sapce.
>
> Regards,
> Renuka N
>