No Duplication or Data Suppression

H

Harriet

Let me try this again...

I am trying to suppress info in a query in Access or maybe there is a better
approach. I have two queries I want to combine to show both their data.
Both have a 'number' field and both have a date field. I want to be able to
select a date range and pull back data for both, without one of them
repeating the 'number' field for each number field of the other's data or
simply, show data for each record once under the correct heading.

Below I've selected the date of the first query so it is the driver when the
data comes back...how do I select a range and make it apply to both so that
the data in the number field is listed only once for each query? How would I
suppress the
duplication?

Ex.
SELECT [tAccuship Calls Union Query].[Accuship Call Number], [tAccuship
Calls Union Query].[Date Received], [tAccuship Registration Union
Query].[Accuship Registration number], [tAccuship Registration Union
Query].[Date Received]

FROM [tAccuship Calls Union Query], [tAccuship Registration Union Query]

WHERE ([tAccuship Calls Union Query].[Date Received] >= CDate([Start Date])
and [tAccuship Calls Union Query].[Date Received] < DateAdd("d", 1,
CDate([End Date])));

Harriet W.
 
K

KARL DEWEY

Post the SQL for [tAccuship Calls Union Query] and [tAccuship Registration
Union Query] queries.
 
H

Harriet

Hi Karl.

I only want to pull back the Accuship Call and Date Received for the
Accuship Calls Query...The SQL is as follows:

SELECT [tAccuship Calls].[Accuship Call], [tAccuship Calls].[Date Received],
[tAccuship Calls].[Time Received], [tAccuship Calls].[Client Name],
[tAccuship Calls].Problem, [tAccuship Calls].Resolution, [tAccuship
Calls].[Date Resolved], [tAccuship Calls].[Time Resolved], [tAccuship
Calls].Status, [tAccuship Calls].[DSSC Clerk]
FROM [tAccuship Calls]
WHERE ((([tAccuship Calls].[Date Received]) Between [Start Date] And [End
Date]));

I only want to pull back the Accuship Registration and Date Request Received
for the Accuship Registration Query...The SQL is as follows:

SELECT [tAccuship Registration].[Accuship Registration], [tAccuship
Registration].[Date Request Received], [tAccuship Registration].[Date
Registered], [tAccuship Registration].Name, [tAccuship Registration].[Client
Code], [tAccuship Registration].[DSSC Clerk], [tAccuship
Registration].[Contact Type], [tAccuship Registration].Comments
FROM [tAccuship Registration]
WHERE ((([tAccuship Registration].[Date Registered]) Between [Start Date]
And [End Date]));

Thank you very much!

I actually have other queries to add but I figured if I could get two of
them to work, I can pattern the others later.

Harriet

KARL DEWEY said:
Post the SQL for [tAccuship Calls Union Query] and [tAccuship Registration
Union Query] queries.

--
Build a little, test a little.


Harriet said:
Let me try this again...

I am trying to suppress info in a query in Access or maybe there is a better
approach. I have two queries I want to combine to show both their data.
Both have a 'number' field and both have a date field. I want to be able to
select a date range and pull back data for both, without one of them
repeating the 'number' field for each number field of the other's data or
simply, show data for each record once under the correct heading.

Below I've selected the date of the first query so it is the driver when the
data comes back...how do I select a range and make it apply to both so that
the data in the number field is listed only once for each query? How would I
suppress the
duplication?

Ex.
SELECT [tAccuship Calls Union Query].[Accuship Call Number], [tAccuship
Calls Union Query].[Date Received], [tAccuship Registration Union
Query].[Accuship Registration number], [tAccuship Registration Union
Query].[Date Received]

FROM [tAccuship Calls Union Query], [tAccuship Registration Union Query]

WHERE ([tAccuship Calls Union Query].[Date Received] >= CDate([Start Date])
and [tAccuship Calls Union Query].[Date Received] < DateAdd("d", 1,
CDate([End Date])));

Harriet W.
 
J

John W. Vinson

Hi Karl.

I only want to pull back the Accuship Call and Date Received for the
Accuship Calls Query...The SQL is as follows:

SELECT [tAccuship Calls].[Accuship Call], [tAccuship Calls].[Date Received],
[tAccuship Calls].[Time Received], [tAccuship Calls].[Client Name],
[tAccuship Calls].Problem, [tAccuship Calls].Resolution, [tAccuship
Calls].[Date Resolved], [tAccuship Calls].[Time Resolved], [tAccuship
Calls].Status, [tAccuship Calls].[DSSC Clerk]
FROM [tAccuship Calls]
WHERE ((([tAccuship Calls].[Date Received]) Between [Start Date] And [End
Date]));

I only want to pull back the Accuship Registration and Date Request Received
for the Accuship Registration Query...The SQL is as follows:

SELECT [tAccuship Registration].[Accuship Registration], [tAccuship
Registration].[Date Request Received], [tAccuship Registration].[Date
Registered], [tAccuship Registration].Name, [tAccuship Registration].[Client
Code], [tAccuship Registration].[DSSC Clerk], [tAccuship
Registration].[Contact Type], [tAccuship Registration].Comments
FROM [tAccuship Registration]
WHERE ((([tAccuship Registration].[Date Registered]) Between [Start Date]
And [End Date]));

Thank you very much!

If you only want to display the Accuship Registration and the Date Request
Received, why are you includeing the other fields?

Are you seeing the Registration and Date Received repeated multiple times? If
so and you only want to see the record once, you will want to use a Totals
query grouping by the two fields and omitting the ones you don't want to see.

Perhaps you could post a dozen or so rows of sample data and show the results
that you wish to see.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top