Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive >> mail # user >> Reg: Merging Rows


Copy link to this message
-
Re: Reg: Merging Rows
Did you try sum(col1), sum(col2) ...   group by id 
On Tuesday, 24 June 2014 1:23 PM, usha hive <[EMAIL PROTECTED]> wrote:
 
Hi,
I am trying to merge few rows in to 1 row. I am stuck. Please help me.
Example
id  col1      col2      col3        col4 
1   44       NULL    NULL    NULL
1  NULL     37       NULL     NULL
1  NULL    NULL   88        NULL
1  NULL    NULL   NULL    99

to
id  col1      col2      col3        col4 

1     44          37        88           99

Thanks,
Usha
 
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB