query pulling records multiple times, but not all

cfp76

Registered User.
Local time
Today, 08:11
Joined
Aug 2, 2001
Messages
42
I am trying to create a query that is using 3 different tables.

Table 1 - account information
Table 2 - insurance detail tying to #1 via carrier code
Table 3 - aging buckets for accounts, tying back by carrier code. This table is initially full of empty fields that are populated during the query.

one-one-one ratio

I have a simple iif statement in the query that says this:

0-30: iif(reportdate-dischgdt>=0 AND reportdate-dischgdt<31,totacctbal,0)

I have it set up as a summation but for some reason I am getting more money populating this field than should be. Overall, I have 8 million more in the fields than should be.

I tied my account information table back to the extract I pulled in and I have the exact number of accounts and the exact number of dollars for each patient type.

What is going on? Any takers?
 
I do not have duplicate information in any of my tables to be added multiple times. I think now my problem is that I'm trying to subtract dates instead of using the DateDiff() function. I'm fiddling with it now. Any help on this is greatly appreciated.

Crystal
 

Users who are viewing this thread

Back
Top Bottom