I found the problem. We were using the wrong field to do the join. The join was using CustNum = CallCustBum. After change it to Key1 (Customer.CustNum = CRMCall.Key1), this BAQ works fine.
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Bill Wu
Sent: Monday, August 08, 2011 9:28 AM
To: vantage@yahoogroups.com
Subject: [Vantage] For each, first or last
We have a BAQ joining customer to CRMCall table. In order to get the last call, we use "Last". Somehow, this thing worked for a while and recently, it started to pull last but second row from the CRMCall table. This caused our customer service calling customer's twice because the last call wasn't listed in the report. The following is a short form of the BAQ. Thanks for the help in advance.
for each Customer no-lock , last CRMCall where (Customer.Company = CRMCall.Company and Customer.CustNum = CRMCall.CallCustNum) no-lock .
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]
From: vantage@yahoogroups.com [mailto:vantage@yahoogroups.com] On Behalf Of Bill Wu
Sent: Monday, August 08, 2011 9:28 AM
To: vantage@yahoogroups.com
Subject: [Vantage] For each, first or last
We have a BAQ joining customer to CRMCall table. In order to get the last call, we use "Last". Somehow, this thing worked for a while and recently, it started to pull last but second row from the CRMCall table. This caused our customer service calling customer's twice because the last call wasn't listed in the report. The following is a short form of the BAQ. Thanks for the help in advance.
for each Customer no-lock , last CRMCall where (Customer.Company = CRMCall.Company and Customer.CustNum = CRMCall.CallCustNum) no-lock .
[Non-text portions of this message have been removed]
[Non-text portions of this message have been removed]