I am trying to update 1 table with the top records from another table for
each record in the first table
UPDATE HPFSLOWMOVING
SET TOP 1 LASTRCTDATE = (SELECT DOCDATE FROM IV30300 INNER JOIN
HPFSLOWMOVING ON HPFSLOWMOVING.I TEMNMBR = IV30300.ITEMNMB R AND
HPFSLOWMOVING.L OCNCODE = IV30300.LOCNCOD E WHERE DOCTYPE = 4)
This updates all records with the same lastrctdate. I need to update each
records with the top lastrctdate where the itemnmbr and locncode equals.
Thanks for any help you can provide!
Darren
each record in the first table
UPDATE HPFSLOWMOVING
SET TOP 1 LASTRCTDATE = (SELECT DOCDATE FROM IV30300 INNER JOIN
HPFSLOWMOVING ON HPFSLOWMOVING.I TEMNMBR = IV30300.ITEMNMB R AND
HPFSLOWMOVING.L OCNCODE = IV30300.LOCNCOD E WHERE DOCTYPE = 4)
This updates all records with the same lastrctdate. I need to update each
records with the top lastrctdate where the itemnmbr and locncode equals.
Thanks for any help you can provide!
Darren
Comment