S
sleepguy
Please Help, I am running the following series of sql scrips and should
be receiving 73 records. Scripts 1 & 2 return 73 records. Script 3 is
only returnig results representing 13 of the 72 records. I have
validated the groupings to ensure that they are common. Can someone
help me understand why I only get 13 of the 72 records.
SQL -1
SELECT DISTINCT Left(dbo_tblStudy!AcquisitionInstrument,20) AS
Collector, dbo_tblStudy.CreationTime, dbo_tblStudy.StudyGUID,
Left(dbo_tblStudy!StudyName,8) AS StudyName
FROM dbo_tblStudy
WHERE (((dbo_tblStudy.CreationTime) Between [Forms]![Form1]![Calendar0]
And [Forms]![Form1]![Calendar1]));
SQL -2
SELECT DISTINCTROW qry_Biling_1.Collector, qry_Biling_1.CreationTime,
qry_Biling_1.StudyGUID, qry_Biling_1.StudyName,
tbl_collector_to_customer.[Customer ID], Tbl_Rates.Rate, 1 AS
Occurance, Tbl_Rates.[CPT Code]
FROM (qry_Biling_1 INNER JOIN tbl_collector_to_customer ON
qry_Biling_1.Collector = tbl_collector_to_customer.[Collector Name])
INNER JOIN Tbl_Rates ON (tbl_collector_to_customer.[Customer ID] =
Tbl_Rates.[Customer ID]) AND (qry_Biling_1.StudyName =
Tbl_Rates.StudyName)
ORDER BY qry_Biling_1.CreationTime;
SQL-3
SELECT qry_billing_2.[CPT Code], qry_billing_2.Occurance,
qry_billing_2.Rate
FROM qry_billing_2;
be receiving 73 records. Scripts 1 & 2 return 73 records. Script 3 is
only returnig results representing 13 of the 72 records. I have
validated the groupings to ensure that they are common. Can someone
help me understand why I only get 13 of the 72 records.
SQL -1
SELECT DISTINCT Left(dbo_tblStudy!AcquisitionInstrument,20) AS
Collector, dbo_tblStudy.CreationTime, dbo_tblStudy.StudyGUID,
Left(dbo_tblStudy!StudyName,8) AS StudyName
FROM dbo_tblStudy
WHERE (((dbo_tblStudy.CreationTime) Between [Forms]![Form1]![Calendar0]
And [Forms]![Form1]![Calendar1]));
SQL -2
SELECT DISTINCTROW qry_Biling_1.Collector, qry_Biling_1.CreationTime,
qry_Biling_1.StudyGUID, qry_Biling_1.StudyName,
tbl_collector_to_customer.[Customer ID], Tbl_Rates.Rate, 1 AS
Occurance, Tbl_Rates.[CPT Code]
FROM (qry_Biling_1 INNER JOIN tbl_collector_to_customer ON
qry_Biling_1.Collector = tbl_collector_to_customer.[Collector Name])
INNER JOIN Tbl_Rates ON (tbl_collector_to_customer.[Customer ID] =
Tbl_Rates.[Customer ID]) AND (qry_Biling_1.StudyName =
Tbl_Rates.StudyName)
ORDER BY qry_Biling_1.CreationTime;
SQL-3
SELECT qry_billing_2.[CPT Code], qry_billing_2.Occurance,
qry_billing_2.Rate
FROM qry_billing_2;