?How to update one table based on another (efficiently)

From: <CHARLESW_at_QUCDN.QueensU.CA>
Date: Tue, 4 May 1993 17:26:24 EDT
Message-ID: <93124.172624CHARLESW_at_QUCDN.QueensU.CA>


 I would like to update one table's records based on records in another. Something like:
  UPDATE BatchTable

     SET Marked_Record = 'Y'
   WHERE ColA||ColB||ColC =

         (SELECT ColX||ColY||ColZ
            FROM AnotherTable)

In other words, if AnotherTable has a triplet that matches a triplet that occurs in BatchTable, then set BatchTable.Marked_Record to 'Y'.

I can't see a more efficient way to do this in the SQL Language manual, but it seems like there must be something less brutal! Can anyone give me a tip on this?

Thanks,

.../dave Dave Charlesworth Received on Tue May 04 1993 - 23:26:24 CEST

Original text of this message