Results 1 to 3 of 3

Thread: Join Query

  1. #1
    Join Date
    May 2004

    Unhappy Unanswered: Join Query

    I have two queries one is called "QryInfantPending"

    SELECT Count(tblInfants.InfantID) AS [Total Infants], IIf(IsNull([tblInfants]![EnrolledDate]),"Pending","Enrolled") AS InfantStatus
    FROM tblInfants
    GROUP BY IIf(IsNull([tblInfants]![EnrolledDate]),"Pending","Enrolled");

    And another one is

    SELECT tblScreening.ScreeningDate, Count(tblScreening.MotherID) AS TotalMotherScreened
    FROM tblScreening
    GROUP BY tblScreening.ScreeningDate;

    I was trying to join this query so i can just have one report that would give me result as

    TimeFrame #ofMotherScreened #ofMotherEnrolled #ofInfantEnrolled InfantStatus

    but when i join this two query i got lot of repeted data even know i use "Distinct" and "DistinctRow"

  2. #2
    Join Date
    Feb 2004
    What do you use as a WHERE condition in your JOIN? Without a WHERE condition (that defines which record should be JOINed with which other record) every single record will be JOINed with every single other, resulting in a huge number of meaningless data.

  3. #3
    Join Date
    May 2004
    Yes, that's what i'm getting it. I didn't use where cluse since there is no PK or FK included in any of those query.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts