Click here to Skip to main content
15,890,557 members
Home / Discussions / Database
   

Database

 
GeneralRe: Count Problem Pin
ronivars20-Feb-07 13:21
ronivars20-Feb-07 13:21 
GeneralRe: Count Problem Pin
ronivars20-Feb-07 12:22
ronivars20-Feb-07 12:22 
QuestionCount Query Prob Pin
tadhg8820-Feb-07 6:39
tadhg8820-Feb-07 6:39 
AnswerRe: Count Query Prob Pin
andyharman20-Feb-07 7:05
professionalandyharman20-Feb-07 7:05 
AnswerRe: Count Query Prob Pin
tadhg8820-Feb-07 7:32
tadhg8820-Feb-07 7:32 
GeneralRe: Count Query Prob Pin
andyharman20-Feb-07 8:17
professionalandyharman20-Feb-07 8:17 
GeneralRe: Count Query Prob Pin
tadhg8821-Feb-07 0:37
tadhg8821-Feb-07 0:37 
GeneralRe: Count Query Prob Pin
tadhg8822-Feb-07 1:53
tadhg8822-Feb-07 1:53 
hi i am using this query to count the amount of team scout reports but when a player has no reports null is returned but i need 0 to be returned this is the sql any help would be appreciated


select sr.ScoutedPersonId, count(distinct convert(varchar, sr.MatchId) + '-' + convert(varchar, sr.ScoutId)) as 'IndCount',
(
-------------------
this is the team count that is not working
select
CASE
When count(distinct convert(varchar, MatchId) + '-' + convert(varchar, ScoutId)) > 0
Then count(distinct convert(varchar, MatchId) + '-' + convert(varchar, ScoutId))
Else 0
END

from ScoutingReport
Where Type = 1 -- team scout reports
And ScoutedPersonId = sr.ScoutedPersonId
group by ScoutedPersonId
---------------
) as 'TeamCount'
from ScoutingReport sr
Join Person p on p.ID = sr.ScoutedPersonId
Where sr.Type = 0
Group By sr.ScoutedPersonId
Having count(distinct convert(varchar, sr.MatchId) + '-' + convert(varchar, sr.ScoutId)) = 1
Order By sr.ScoutedPersonId


QuestionHow to add costum row to combo what linked to DataSource Pin
El'Cachubrey20-Feb-07 3:37
El'Cachubrey20-Feb-07 3:37 
QuestionHow to order Integer field as a string ?? Pin
kindman_nb20-Feb-07 3:22
kindman_nb20-Feb-07 3:22 
AnswerRe: How to order Integer field as a string ?? Pin
Aswanikumarj20-Feb-07 3:45
Aswanikumarj20-Feb-07 3:45 
GeneralRe: How to order Integer field as a string ?? Pin
kindman_nb20-Feb-07 5:05
kindman_nb20-Feb-07 5:05 
AnswerRe: How to order Integer field as a string ?? Pin
andyharman20-Feb-07 3:46
professionalandyharman20-Feb-07 3:46 
GeneralRe: How to order Integer field as a string ?? Pin
kindman_nb20-Feb-07 5:07
kindman_nb20-Feb-07 5:07 
QuestionSQL server does not exists or access denied. Pin
Aswanikumarj20-Feb-07 3:06
Aswanikumarj20-Feb-07 3:06 
AnswerRe: SQL server does not exists or access denied. Pin
Krish - KP20-Feb-07 17:11
Krish - KP20-Feb-07 17:11 
GeneralRe: SQL server does not exists or access denied. Pin
Aswanikumarj28-Feb-07 6:02
Aswanikumarj28-Feb-07 6:02 
QuestionAverage of all columns Pin
Sam Heller20-Feb-07 1:55
Sam Heller20-Feb-07 1:55 
AnswerRe: Average of all columns Pin
andyharman20-Feb-07 3:44
professionalandyharman20-Feb-07 3:44 
GeneralRe: Average of all columns Pin
Sam Heller20-Feb-07 5:09
Sam Heller20-Feb-07 5:09 
AnswerRe: Average of all columns Pin
andyharman20-Feb-07 22:40
professionalandyharman20-Feb-07 22:40 
QuestionSQL Server 2000 Installation problem on Windows server 2003 Pin
Gulfraz Khan20-Feb-07 1:51
Gulfraz Khan20-Feb-07 1:51 
AnswerRe: SQL Server 2000 Installation problem on Windows server 2003 Pin
Smart_Boy13-Mar-07 19:14
Smart_Boy13-Mar-07 19:14 
GeneralRe: SQL Server 2000 Installation problem on Windows server 2003 Pin
Gulfraz Khan14-Mar-07 5:49
Gulfraz Khan14-Mar-07 5:49 
QuestionNull values Pin
gauthee20-Feb-07 0:33
gauthee20-Feb-07 0:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.