Hi, 

This query works fine in Oracle 

scratch...@mydb.mich.LOCAL> select * from dummy where id = (select
max(id) from dummy); 

 ID CLUSTERED SCATTERED RANDOMISED RANDOM_STRING SMALL_VC PADDING
---------- ---------- ---------- ----------
-------------------------------------------------- ---------- ----------
100000000 99999 999 903
qypMpSUppiNTVTLgbrOBczEPZJXUmLjzvZOUvRmIMQAoyYeGZo 100000000 xxxxxxxxxx 

However, in Hive 2 it fails 

0: jdbc:hive2://rhes564:10010/default> select * from dummy where id =
(select max(id) from dummy);
Error: Error while compiling statement: FAILED: ParseException line 1:32
cannot recognize input near 'select' 'max' '(' in expression
specification (state=42000,code=40000) 
-- 

Dr Mich Talebzadeh

LinkedIn
https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw

http://talebzadehmich.wordpress.com

NOTE: The information in this email is proprietary and confidential.
This message is for the designated recipient only, if you are not the
intended recipient, you should destroy it immediately. Any information
in this message shall not be understood as given or endorsed by Cloud
Technology Partners Ltd, its subsidiaries or their employees, unless
expressly so stated. It is the responsibility of the recipient to ensure
that this email is virus free, therefore neither Cloud Technology
partners Ltd, its subsidiaries nor their employees accept any
responsibility.

 

Reply via email to