Update with Select...

  • Now do a select on SELECT * FROM PRODDTA.F0911 WHERE PRODDTA.F0911.[GLREG#] =0

    and see how many records are returned

    Prasad Bhogadi
    www.inforaise.com

  • This should do it for you.

    UPDATE PRODDTA.F0911

    SET [GLREG#] = 0

    WHERE GLLT = 'AA' AND GLPN = 12

    AND GLCTRY = 20 AND GLFY = 5

    The reason your update query didn't work was that it was updating every row where the value of GLREG# was in the result of the first query, even if all of those rows didn't meet the filter conditions of the original query.  Hope that makes sense!

    John

  • Makes complete sense, how did I miss? It was academic

    Prasad Bhogadi
    www.inforaise.com

  • ups!!!!

    Thanks guys.

    Yes, you are righ. And the solution is more simple and nice.

    Thanks a lot to everybody for your time.

    bye

    aurygp

Viewing 4 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply