Try coalesce

On Tue, Jun 24, 2014 at 2:49 PM, sumit ghosh <sumi...@yahoo.com> wrote:

> Did you try sum(col1), sum(col2) ...   group by id
>
>
>   On Tuesday, 24 June 2014 1:23 PM, usha hive <ushah...@gmail.com> 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
>
>
>

Reply via email to