Re: Reg: Merging Rows

2014-06-25 Thread ushahive
Thank u so much it helped. On Tue, Jun 24, 2014 at 2:49 PM, sumit ghosh wrote: > Did you try sum(col1), sum(col2) ... group by id > > > On Tuesday, 24 June 2014 1:23 PM, usha hive wrote: > > > Hi, > > I am trying to merge few rows in to 1 row. I am stuck. Please help me. > > Example > id

Re: Reg: Merging Rows

2014-06-24 Thread Andre Araujo
...SUM(COALESCE(col1, 0)), ... On 25 June 2014 08:01, Krishnan Narayanan wrote: > Try coalesce > > > On Tue, Jun 24, 2014 at 2:49 PM, sumit ghosh wrote: > >> Did you try sum(col1), sum(col2) ... group by id >> >> >> On Tuesday, 24 June 2014 1:23 PM, usha hive wrote: >> >> >> Hi, >> >> I

Re: Reg: Merging Rows

2014-06-24 Thread Krishnan Narayanan
Try coalesce On Tue, Jun 24, 2014 at 2:49 PM, sumit ghosh wrote: > Did you try sum(col1), sum(col2) ... group by id > > > On Tuesday, 24 June 2014 1:23 PM, usha hive wrote: > > > Hi, > > I am trying to merge few rows in to 1 row. I am stuck. Please help me. > > Example > id col1 col2

Re: Reg: Merging Rows

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