At 03:29 PM 6/19/2013, Patti Jakusz wrote:

I still get an illegal select function (2511).

That is the result of updating a "unique row" table column with
"many values" table.

Based on Bill Downall's example, here's a routine which you can
run on demand.

-- Update Last Home Visit Date in ClientMaster
   CLS
   PAUSE 3 USING 'Updating Last Home Visit Date ...' +
   CAPTION 'Last Home Visits' ICON INFO +
   OPTION MESSAGE_FONT_NAME Tahoma +
   |MESSAGE_FONT_COLOR NAVY +
   |MESSAGE_FONT_SIZE 11 +
   |THEMENAME Longhorn

-- Define Last Visit by ClientID
   SET ERROR MESSAGE 677 OFF
   DROP VIEW tLastVistDates
   SET ERROR MESSAGE 677 ON
   CREATE TEMPORARTY VIEW tLastVistDates +
   (ClientID, LastVisitDate) AS SELECT +
    ClientID, (MAX(VisitDate)) +
   FROM HomeVisit GROUP BY ClientID

-- Now Update the LastHomeVisit Column in ClientMaster
   UPDATE ClientMaster SET LastHomeVisit = LastVisitDate +
   FROM tLastVistDates,ClientMaster +
   WHERE ClientMaster.ClientID = tLastVistDates.ClientID
   CLS
   RETURN

Save this routine as a command file and re-cycle as you wish!

Very Best R:egards,

Razzak.


Reply via email to