I'm not far enough along for that command yet.  I'm getting illegal select 
function on the first half of your solution.  Naturally, my actual tables are 
not as simple as what I wrote.  My ClientId is a computed field.  
 
This is a little more complicated than what I had been doing - projecting a 
temp table with my dates sorted in ascending order.  Then I just do a regular 
update command and I skip the "max" specification.  It will update each client 
record a bunch of times (however many times I have a HomeVisit record), but 
since the records are already sorted, the last update will be the latest date.
 
It just seems like the  "max" spec should work in the update command, and it 
never has for me.
 
Thanks though,
Patti

 
From: Bill Downall <[email protected]>
To: RBASE-L Mailing List <[email protected]> 
Sent: Wednesday, June 19, 2013 3:51 PM
Subject: [RBASE-L] - Re: I always have trouble with the update command





On Wed, Jun 19, 2013 at 3:38 PM, Bill Downall <[email protected]> 
wrote:

UPDATE ClientMaster +
>  SET LastHomeVist = MaxVisitDate +
>FROM ClientMaster, MaxVisitDates h2 +
>WHERE ClientMaster.ClientID = h2.ClientID
Oops. FROM clause should have referenced the VIEW, not the table, as shown in 
the edit above.

Reply via email to