Hi DB2 gurus, the DB2 version i'm using is 8.2.3.

I'm currently trying to remove unnecessary rows dynamically from a DB2 dataset. To illustrate, here's an example.

taking 3 columns say Group, Category and Value

In Group we have: Asset
In Category we have: Fixed, Non-Fixed, Depreciated (amogst others, they are about 50)
In Value would be the actual values, so in table form:

Asset Fixed 100
Non-Fixed 100
Depreciated 200

Now imagine that Fixed and Non-fixed are actually the same thing, someone entered the data twice under different Categories so the value is duplicated. Summing for Asset will give 400 when the actual sum should only be 100.

How can I use a select statement such that only Fixed or Non-Fixed will be selected without removing the Category column and summing. That means the final result will give

Asset Fixed 100
Depreciated 200

The final result should show Fixed or Non-Fixed (doesn't matter which but only 1 can be shown). I tried using select distinct but that actually select distinct rows which doesn't work for this case.

Any idea gurus? Your help is greatly appreciated.

Cheers.