Subject Re: [ib-support] Re: Update using two tables
Author lester@lsces.co.uk
> Yes - but can you see that each tableA.datefield will have the same
> date ( the max or min date ) of the whole of tableB.

NO - the tableB value will be modified for each different
tableA entry.

> I need each record in tableA to have the same date as its join record
> in tableB (TableA and TableB have a number field which is unique in
> each table )

From my own application

UPDATE CALLER
SET LASTVISIT =
( SELECT MAX(TICKET_REF) FROM TICKET
WHERE TICKET.CALLER_ID = CALLER.CALLER_ID)

I have just run it on a database that I wipped the LASTVISIT
column on, and each CALLER_ID has it's own LASTVISIT filled
in as I would expect - with blank entries where older ticket
entries have been deleted.
( Have run in IB_SQL )

--
Lester Caine
-----------------------------
L.S.Caine Electronic Services