Subject Re: Summiing Amounts
Author Svein Erling Tysvær
> select datecolumn, item,
> sum(case when amount > 0 then amount else 0) as posamt,
> sum(case when amount < 0 then -amount else 0) as negamt
> group by datecolumn, item

Uh, oh, slight mistake:

select datecolumn, item,
sum(case when amount > 0 then amount else 0 end) as posamt,
sum(case when amount < 0 then -amount else 0 end) as negamt
group by datecolumn, item

Sorry,
Set