
Help with a join query into Crystal Reports 6 Exception Report
M;
I'll take a whack at it.
Select [Whatever from Table1 and Whatever From Table2] From Table1
inner join table2 on (Table1.MeasureID = Table2.MeasureID and
Table2.MeasureLimit <= Table1.Result)
order by MeasureID, CustomerID, DateVisited
That would give all rows from table1 that have a match in table2 which
satisfy the ON criteria, which would be the same measureID as the current
row in table1 and the measurelimit less than or equal to result.
What the selection criteria is is a little fuzzy.
ds
Quote:
> Hello Group,
> What I am working on is an Exception Report.
> Here is what the two tables look like.
> Table 1 fields
> CustomerID | MeasureID | DateVisited (unique) | Result
> Table 2 fields
> MeasureID (unique) | MeasureLimit
> notes: Table1.MeasureID is joined to Table2.MeasureID. Every time a
> customer visits a new record in Table1 hence the unique date. There is a
> set group of unique Measures which all have a record in the Table2.
> I want to do a report that breaks down like this :
> MeasureID sorted. Then CustomerID sorted. Dates going accross.
> QUESTION: If NONE of the results (for any of the days) for MeasureID
for
> a particular customerID exceed the limit, I DON'T want that information in
> the report. Basically , If there is a violation of the limit I want that
in
> the report, if it falls within the norms I don't want it shown. The
problem
> I have had is everyway I try to do this It tells me that "has not been
> evaluated" error.
> Any help would be appreciated.
> Thanks in advance,
> Matt Lefevre