February 17, 2015 at 3:53 pm
Hi,
Below is the My Table data...
TypeUser Name region duration1duration2dailsMathSilverGold
ARamesh Section01 892 1742 40 1 3103
BNaresh Section01 0 0 0 0 08
BSingh Section01 0 3003 120 0 226
BKanth Section01 359 1261 52 1 013
BPeter Section01 1716 3230 173 0 128
Total Section01-Total 2967 9236 385 1 3103
Above From Duration1(Calculating type of A+B),Duration2(Calculating type of A+B),Dials(Calculating Type of A+B)
But Math,Silver,Gold I need to Calculate of Type A.
I need to get The Total Like above out put.
Help me,
Thanks
February 23, 2015 at 2:35 pm
Try this..
Select sum(Duration1) as Duration1,Sum(Duration2)as Duration2,
Sum(Duration3) as Duration3, Case When Type = A then Math END as Math, Case When Type = A then Silver END as Silver
From Table
where Type in ('A','B')
Thanks,
Chinna
Its the Journey which gives you Happiness not the Destination-- Dan Millman
February 23, 2015 at 8:17 pm
suresh0534 (2/17/2015)
Hi,Below is the My Table data...
TypeUser Name region duration1duration2dailsMathSilverGold
ARamesh Section01 892 1742 40 1 3103
BNaresh Section01 0 0 0 0 08
BSingh Section01 0 3003 120 0 226
BKanth Section01 359 1261 52 1 013
BPeter Section01 1716 3230 173 0 128
Total Section01-Total 2967 9236 385 1 3103
Above From Duration1(Calculating type of A+B),Duration2(Calculating type of A+B),Dials(Calculating Type of A+B)
But Math,Silver,Gold I need to Calculate of Type A.
I need to get The Total Like above out put.
Help me,
Thanks
Just a suggestion... It took almost a week before someone responded to your problem. Please see the first link under "Helpful Links" in my signature line below for what the problem may have been and how to solve it in the future.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply