Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2003
    Posts
    60

    Unanswered: Query Optimization

    UPDATE SESSION.TEMP02 TMP_AMT
    SET (
    VAL
    ) =
    (
    SELECT TMP_CVL.VAL
    FROM SESSION.TEMP_VAL TMP_CVL
    WHERE TMP_AMT.CVRG_ID = TMP_CVL.CVRG_ID
    AND TMP_AMT.NUM = TMP_CVL.NUM
    );


    Is there any way we can rewrite this to perform better?

    Thanks,
    j

  2. #2
    Join Date
    Sep 2003
    Posts
    3
    try this :

    UPDATE SESSION.TEMP02 TMP_AMT, SESSION.TEMP_VAL TMP_CVL
    SET TMP_AMT.VAL = TMP_CVL.VAL
    WHERE TMP_AMT.CVRG_ID = TMP_CVL.CVRG_ID
    AND TMP_AMT.NUM = TMP_CVL.NUM;

    Maybe more rapidly... :-/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •