I have a very basic table as shown below
DOC_NUMBER - int
LAYER - int
PERCENTAGE - decimal(18,4)
There are '3' possible layers. 1, 2 or 3
I'm trying to get a total percentage for each layer by doc_number
so the records could look like this.
doc_number layer percentage
100 1 1.2
100 1 10.2
100 2 34.2
100 2 2.23
100 3 16.2
I'm looking at getting a sum for each layer in the same query. I can do this separate not a problem but was trying to avoid writing 3 separate stored procedures.
any help would be appreciated
Thanks
DOC_NUMBER - int
LAYER - int
PERCENTAGE - decimal(18,4)
There are '3' possible layers. 1, 2 or 3
I'm trying to get a total percentage for each layer by doc_number
so the records could look like this.
doc_number layer percentage
100 1 1.2
100 1 10.2
100 2 34.2
100 2 2.23
100 3 16.2
I'm looking at getting a sum for each layer in the same query. I can do this separate not a problem but was trying to avoid writing 3 separate stored procedures.
any help would be appreciated
Thanks