Re: question about update/join query

2008-05-08 Thread Andy Wallace
EL.enduser_acnt = Event.enduser_anct group by EL.event_time); // group by EL.enduser_acnt); HTH Martin - Original Message - From: "Andy Wallace" <[EMAIL PROTECTED]> To: "Martin" <[EMAIL PROTECTED]> Cc: "mysql list" Sent: Wednesday, M

Re: question about update/join query

2008-05-07 Thread Andy Wallace
group by EL.event_time); // group by EL.enduser_acnt); HTH Martin - Original Message - From: "Andy Wallace" <[EMAIL PROTECTED]> To: "Martin" <[EMAIL PROTECTED]> Cc: "mysql list" Sent: Wednesday, May 07, 2008 6:21 PM Subject: Re: qu

Re: question about update/join query

2008-05-07 Thread Andy Wallace
group by EL.event_time); // group by EL.enduser_acnt); HTH Martin - Original Message - From: "Andy Wallace" <[EMAIL PROTECTED]> To: "Martin" <[EMAIL PROTECTED]> Cc: "mysql list" Sent: Wednesday, May 07, 2008 6:21 PM Subject: Re: questi

Re: question about update/join query

2008-05-07 Thread Andy Wallace
se in UPDATE statement? M - Original Message - From: "Andy Wallace" <[EMAIL PROTECTED]> To: "mysql list" Sent: Wednesday, May 07, 2008 1:07 PM Subject: Re: question about update/join query Clarification: I DON'T want to update the last_visit field if the

Re: question about update/join query

2008-05-07 Thread Andy Wallace
Clarification: I DON'T want to update the last_visit field if there is no matching event record... I managed to get this to sort of work: update enduser E set E.last_visit = (select MAX(EL.event_time) from event_log EL where EL.enduser_acnt = E.enduser_acn

question about update/join query

2008-05-07 Thread Andy Wallace
Hey all - I have two tables - an event_log table, and a user table. There is a "last_visit" column in the user table, and I want to update it from the event_log with the most recent event timestamp. And I want to do it without a subquery, eventually, both these tables will be pretty large, especia