Still didn't work, returning multiple transactions for any given individual.
I clipped this from the results (there should only be one individual and the
paid thru should be 7/31/2004, which is the newest (highest) transactionID
memberlevelID | email | firstname | lastname | paidthru
M | [EMAIL PROTECTED] | Andy Granger | 07/31/2004
M | [EMAIL PROTECTED] | Andy Granger | 12/31/2004
Here's how I posted it:
SELECT M.memberID, M.firstName, M.middleName, M.lastName, M.email,
M.company, M.city, M.zip, M.memberLevelID, MAX(T.transactionID) as maxID,
T.paidThru
FROM #REQUEST.prefix#_Members_List M
INNER JOIN #REQUEST.prefix#_Members_TransactionLog T ON t.memberID =
m.memberID
WHERE ...
GROUP BY M.memberID, M.firstName, M.middleName, M.lastName, M.email,
M.company, M.city, M.zip, M.memberLevelID, T.paidThru
Thanks for hanging in there with me on this one...
_____
From: Mark Leder [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 18, 2004 1:09 PM
To: CF-Talk
Subject: RE: SQL Query problem
I'll give this a try and let you know. Thanks for your response.
_____
From: Marc Lowe [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 18, 2004 12:54 PM
To: CF-Talk
Subject: Re: SQL Query problem
I left a lot of your query out but you should be able to look at this and
see the biggest differences.
SELECT m.memberID, m.firstname, m.lastname,
MAX(t.transactionID) as maxID
FROM members m
INNER JOIN trans t ON t.memberID = m.memberID
GROUP BY m.memberID, m.firstname, m.lastname
Hope that helps,
Marc
_____
_____
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
[Donations and Support]
- Re: SQL Query problem Alexander Sherwood
- RE: SQL Query problem Mark Leder
- RE: SQL Query problem Alexander Sherwood
- RE: SQL Query problem Mark Leder
- RE: SQL Query problem Alexander Sherwood
- RE: SQL Query problem Mark Leder
- RE: SQL Query problem Alexander Sherwood
- RE: SQL Query problem Mark Leder
- Re: SQL Query problem Marc Lowe
- RE: SQL Query problem Mark Leder
- RE: SQL Query problem Mark Leder
- RE: SQL Query problem Tangorre, Michael
- RE: SQL Query problem Mark Leder
- RE: SQL Query problem Tangorre, Michael
- Re: SQL Query problem Marc Lowe
- Re: SQL Query problem Marc Lowe
- RE: SQL Query problem - SOLVED Mark Leder
- RE: SQL Query problem - SOLVED Mark Leder
- SQL Query Problem bhattach
- Re: SQL Query Problem Claude Schneegans
- Re: SQL Query Problem joe velez