What version of hive are you using? Support for scalar subqueries was added in 
2.2 (ref: HIVE-15544 <https://issues.apache.org/jira/browse/HIVE-15544>)

Vineet

> On Dec 9, 2019, at 7:58 AM, Devopam Mittra <devo...@gmail.com> wrote:
> 
> Please try with subquery alias . 
> Regards
> 
> 
> On Mon, Dec 9, 2019, 6:06 AM Dan Horne <dan.ho...@redbone.co.nz 
> <mailto:dan.ho...@redbone.co.nz>> wrote:
> Hi All
> 
> I'm trying to run the following subquery but it returns an error that says 
> "cannot recognize input near 'select' 'max' '(' in expression specification"
> 
> select id,
> first_name,
> last_name,
> change_seq
> from person_source
> where change_seq >
> (select max(change_seq) from person_target) A;
> 
> If I replace the sub query with the actual maximum change_seq it works.
> 
> Is there another construct that should work?
> 
> Regards
> 
> Dan

Reply via email to