Update with SQL Question
From: Alan S <ajs6695_at_jps.net>
Date: Tue, 29 Jun 1999 19:46:05 -0700
Message-ID: <3779f15f_at_news1.jps.net>
[Quoted] I need to update a value in one table based on the corresponding value in another table. In this case MPI_ID = OLD_EPI_NUM. NEW_EPI_NUM updated into the MPI_ID field.
Date: Tue, 29 Jun 1999 19:46:05 -0700
Message-ID: <3779f15f_at_news1.jps.net>
[Quoted] I need to update a value in one table based on the corresponding value in another table. In this case MPI_ID = OLD_EPI_NUM. NEW_EPI_NUM updated into the MPI_ID field.
UPDATE SX_TABLE
SET MPI_ID = (SELECT NEW_EPI_NUM
FROM MPI_XREF
WHERE MPI_XREF.OLD_EPI_NUM = SX_TABLE.MPI_ID)
WHERE EXISTS (SELECT NEW_EPI_NUM
FROM MPI_XREF
WHERE MPI_XREF.OLD_EPI_NUM = SX_TABLE.MPI_ID);
[Quoted] Someone from this group has already helped me this far. This query does
work, but it takes an very long amount of time. There are approximately
25000 records and I let it run for over an hour before cancelling it. Is
there any other approach that might speed thing up. We are running 7.3.4 on
[Quoted] an HP K Series 9000. Insert queries and others take mere seconds to run.
Thank you,
Alan Received on Wed Jun 30 1999 - 04:46:05 CEST
