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/04 06:44:26 UTC

Query in HQL

Hi Folks,

Here is my query,

select customerid as CustomerId  from Customers

It returns table with column name as 'customerid', ' CustomerId' in the
query was not reflected into table. What shall i do to display column name
as 'CustomerId'.

Regards,
Renuka

Re: Query in HQL

Posted by Ankit Bhatnagar <an...@yahoo-inc.com>.
My bad .. i looked up the code and hive really transforms everything to lower case. 


     On Wednesday, June 3, 2015 10:02 PM, Renuka Be <re...@gmail.com> wrote:
   

 Hi Ankit,
Thanks for your reply.
I have tried as you suggested it throws below error.
FAILED: ParseException line 1:21 cannot recognize input near 'as' ''CustomerId'' 'from' in selection target

Query: select customerid as 'CustomerId' from Customers
Regards,Renuka
On Thu, Jun 4, 2015 at 12:49 AM, Ankit Bhatnagar <an...@yahoo-inc.com> wrote:

modify to say >  'CustomerId' 



     On Wednesday, June 3, 2015 9:44 PM, Renuka Be <re...@gmail.com> wrote:
   

 Hi Folks,
Here is my query,
select customerid as CustomerId  from Customers

It returns table with column name as 'customerid', ' CustomerId' in the query was not reflected into table. What shall i do to display column name as 'CustomerId'.
Regards,Renuka

   



  

Re: Query in HQL

Posted by Renuka Be <re...@gmail.com>.
Hi Ankit,

Thanks for your reply.

I have tried as you suggested it throws below error.

FAILED: ParseException line 1:21 cannot recognize input near 'as'
''CustomerId'' 'from' in selection target

Query: select customerid as 'CustomerId' from Customers

Regards,
Renuka

On Thu, Jun 4, 2015 at 12:49 AM, Ankit Bhatnagar <an...@yahoo-inc.com>
wrote:

> modify to say > 'CustomerId'
>
>
>
>
>   On Wednesday, June 3, 2015 9:44 PM, Renuka Be <re...@gmail.com>
> wrote:
>
>
> Hi Folks,
>
> Here is my query,
>
> select customerid as CustomerId  from Customers
>
> It returns table with column name as 'customerid', ' CustomerId' in the
> query was not reflected into table. What shall i do to display column name
> as 'CustomerId'.
>
> Regards,
> Renuka
>
>
>

Re: Query in HQL

Posted by Ankit Bhatnagar <an...@yahoo-inc.com>.
modify to say >  'CustomerId' 



     On Wednesday, June 3, 2015 9:44 PM, Renuka Be <re...@gmail.com> wrote:
   

 Hi Folks,
Here is my query,
select customerid as CustomerId  from Customers

It returns table with column name as 'customerid', ' CustomerId' in the query was not reflected into table. What shall i do to display column name as 'CustomerId'.
Regards,Renuka