Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Analysis Server and Reporting Services (2005)
 not grouping

Author  Topic 

dmaxj
Posting Yak Master

174 Posts

Posted - 2010-03-09 : 15:46:56
I am using the following select statement in SSRS 2205. I am wondering why all RACES not being grouped?

SELECT DISTINCT CCOC_Intake_Eligibility.patient_ID, CCOC_Intake_Eligibility.race, COUNT(CCOC_Intake_Eligibility.race) AS CountRace
FROM CCOC_Intake_Eligibility, CCPP_ScreenResults
WHERE CCOC_Intake_Eligibility.patient_ID = CCPP_ScreenResults.patient_ID AND (NOT (CCPP_ScreenResults.screeningTest LIKE 'No Show')) AND
(CCOC_Intake_Eligibility.colonoscopyScheduledDate >= ?) AND (CCOC_Intake_Eligibility.colonoscopyScheduledDate <= ?)
GROUP BY CCOC_Intake_Eligibility.race


This is my a sample of the output.



69 Black 144
530 Other NULL
531 Other NULL
553 Other NULL
606 Other NULL
611 Other NULL
618 Other NULL
625 Other NULL
634 Other NULL
646 Other NULL
559 Unknown NULL
679 Unknown NULL
710 Unknown NULL
742 Unknown NULL
747 Unknown NULL
462 White NULL
500 White NULL
501 White NULL
504 White NULL
514 White NULL
519 White NULL
539 White NULL
543 White NULL
544 White NULL
550 White NULL
551 White NULL
554 White NULL
561 White NULL
566 White NULL
569 White NULL
572 White NULL
574 White NULL
575 White NULL
577 White NULL
578 White NULL
581 White NULL
589 White NULL
592 White NULL
594 White NULL
595 White NULL
596 White NULL
597 White NULL
598 White NULL
600 White NULL
602 White NULL
603 White NULL
605 White NULL
609 White NULL
613 White NULL
617 White NULL
626 White NULL
635 White NULL
639 White NULL
648 White NULL
649 White NULL
651 White NULL
652 White NULL
654 White NULL
663 White NULL
664 White NULL
665 White NULL
673 White NULL
674 White NULL
690 White NULL
696 White NULL
699 White NULL
700 White NULL
702 White NULL
704 White NULL
705 White NULL
708 White NULL
709 White NULL
715 White NULL
716 White NULL
717 White NULL
720 White NULL
723 White NULL
724 White NULL
726 White NULL
727 White NULL
729 White NULL
734 White NULL

dmaxj
Posting Yak Master

174 Posts

Posted - 2010-03-10 : 08:54:27
I guess I should add - why are 'Other', 'Unknown', 'White' not being group together with a total count like the first row of output?
Go to Top of Page

dmaxj
Posting Yak Master

174 Posts

Posted - 2010-03-11 : 09:04:41
I may have this posted in wrong forum - Maybe move to T-SQL forum?
Go to Top of Page
   

- Advertisement -