Part of the problem that is making it harder than it has to be is that your table is not normalized. You should not have mutliple or repeating ICD-9 values in each record (going across). You should have a separate record for each, i.e.
Code:
Provider ICD-9 Number ICD-9 Value
Doe1 1 719.40
Doe1 2 719.40
Doe1 3 719.40
Doe1 4 719.40
Doe1 1 719.46
...
See here for rules of database normalization: http://www.deeptraining.com/litwin/d...aseDesign.aspx
Thenm you can use an Aggregate Query to count and group all your data. Then you may be able to use a Cross-Tab Query to get it in the format you desire.