D
dp
Hi everyone:
I am having a hard time trying to get my query to work. I only want to
return the maximum record from group of records that all have the same sales
order ID. I have an autonumber field in it that I can use to get the maximum
from this group. But, my query keeps returning multiple results.
This is what I have so far
SELECT (T1.Customer_ID) AS CustOldValue,T1.LogDate,T1.ComputerName
FROM (
SELECT Max(SALESORDERREF_TXNID) AS MaxOfSALESORDERREF_TXNID, Max(autoNum) AS
MaxOfautoNum
FROM customer_log_table
WHERE (SALESORDERREF_TXNID)='3340') as T2
inner join customer_log_table T1 on (T2.MaxOfSALESORDERREF_TXNID =
T1.SALESORDERREF_TXNID);
Any help would be appreciated,
Thanks,
David
I am having a hard time trying to get my query to work. I only want to
return the maximum record from group of records that all have the same sales
order ID. I have an autonumber field in it that I can use to get the maximum
from this group. But, my query keeps returning multiple results.
This is what I have so far
SELECT (T1.Customer_ID) AS CustOldValue,T1.LogDate,T1.ComputerName
FROM (
SELECT Max(SALESORDERREF_TXNID) AS MaxOfSALESORDERREF_TXNID, Max(autoNum) AS
MaxOfautoNum
FROM customer_log_table
WHERE (SALESORDERREF_TXNID)='3340') as T2
inner join customer_log_table T1 on (T2.MaxOfSALESORDERREF_TXNID =
T1.SALESORDERREF_TXNID);
Any help would be appreciated,
Thanks,
David