Here is the relevant documentation: http://wiki.apache.org/hadoop/Hive/LanguageManual ... see the Union section.
Cheers, Ajo. On Thu, Feb 17, 2011 at 11:12 PM, sangeetha s <sangee....@gmail.com> wrote: > Hi, > > I am trying to perform union of two tables which are having identical > schemas and distinct data.There are two tables 'oldtable' and 'newtable'. > The old table contains the information of old users and the new table will > conatin the information of new user. I am trying to update the new entry in > the old table using the following query. > > INSERT OVERWRITE TABLE oldtable SELECT * FROM (SELECT * FROM oldtable UNION > select * from newtable); > > executing the above query results, > FAILED:Parse Error:line 1.68 mismatched input 'select' expecting ALL in > query operator. > > I am currently using Hadoop verso 0.20.2 and Hive 0.4.1 from apache > disctribution. Will Hive 0.4.1 support UNION and UNION ALL queries? Is the > above problem is dueto the Hive version or due to a wrong query? Also I am > not using any partitions in these tables and the table format is TextFile. > > Any pointers in this regard would be highly helpful. > > -- > > > > Regards, > Sangita > > > -- > >