Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cross Tab Query Duplicating Data

Status
Not open for further replies.

ajhts

Technical User
May 1, 2001
84
US
I have a cross tab query that pulls minutes per day.
I also have a cross tab query that pulls units per day.
I combined the two with a standard query that pulls minutes and units together on the correct day.

I have been very pleased with the results on the query and report until I came across this problem.

My results display a report that looks like this:

Grouped by Patient# Patient # 100

CPT Code Day1 Day2 Day3 Day4
97001 Units 2 1 3 5
Minutes 40 20 10 40

97115 Units 1 3 5 2
Minutes 30 10 40 30

This is great when I print the report with the criteria of enter patient number or if I just have one patient in the system.
The problem lies when I have a 2nd patient or more that uses the same code as a prior patient. It generates multiple pages with the correct data, however it duplicates the lines of cpt codes. It continues to work fine if I print by patient number only. I can't generate a query the contains all of the patients at once without it duplicating them.

This is very hard to explain and I am pretty sure the problem lies within the normal query that pulls both crosstabs queries. I know this because you can see the data start to duplicate within that query. I am probably doing something wrong, like maybe a relationship between queries? I am not sure. Please help!

AJ

 
It sounds like you have a problem with the join between the two crosstab queries. How are the two joined? What fields are available in each query?



[flush]

DBAMJA

It is said that God will give you no more than you can handle. I just wish God didn't have so much faith in me.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top