Last post Jan 13, 2016 02:18 PM by Abogados Madrid
Dec 24, 2015 10:13 AM|stenmananders|LINK
I am struggling again with a sql statement , this time it should count two coulmns and display them , but the sum of this two columns should be displayed as well where the sum of the most top 10 are shown.
I am building it like this but ofcourse it gives error since my sql is poorly done:
SelectCommand="SELECT top 10 Finals WHERE EXISTS ,(SELECT [Winner], COUNT(*) Winner1 FROM [Tournament] ), ( SELECT [Runner], COUNT(*) Runner1 FROM [Tournament]) From [Tournament] AND Winner1+Runner1=Finals GROUP BY Finals "></asp:SqlDataSource>
I have all five fields above declared as asp:BoundField DataFields hopefully this should be ok.
Thanks to all users of this site that have helped me earlier and I am sure its users will help me out once again!
Merry Christmas and Happy New Year!
Dec 25, 2015 07:35 AM|Fei Han - MSFT|LINK
Firstly, could you show us some your original data and the output you want? Which will help us understand your requirement.
Secondly, you could refer to this thread that discussed how to count columns and get summary data.
Jan 05, 2016 11:37 AM|stenmananders|LINK
Hi Fei Han,
The out put should display the amount of times the player are listed in a column, as well display a total of amounts in Col A Col B
Player 1 Player 2
Player 1 Player 2
Player 1 Player 3
Player 2 Player 1
Player 3 Player 1
That should give output:
Name Wins Losses Total
Player1 3 2 5
Player2 1 3 4
Player3 1 1 2
Thanks in advance for your help.
Jan 13, 2016 02:18 PM|Abogados Madrid|LINK
Nice solution man!!! i needed to find a way to make this on my website and thanks to asp.net i can do it, seriously im very happy about it, nice updates, im waiting for the next bro!! a hug and goodbye to all ;) this is my website and this is how i did it
thanks to all your help guys!! thank u again