Subject | Re: [ib-support] Re: Update using two tables |
---|---|
Author | lester@lsces.co.uk |
Post date | 2002-02-13T16:49:32Z |
> Yes - but can you see that each tableA.datefield will have the sameNO - the tableB value will be modified for each different
> date ( the max or min date ) of the whole of tableB.
tableA entry.
> I need each record in tableA to have the same date as its join recordFrom my own application
> in tableB (TableA and TableB have a number field which is unique in
> each table )
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