Re[2]: updating table based on other table values

2004-08-05 Thread DebugasRu
PP> try: PP> update tmpISM,ta PP> set tmp.SUMA=tmp.SUMA-ta.SUMA PP> where (tmp.PID=ta.PID) and (tmp.PAJ=ta.PAJ) Does update work on more than one table ? thank you for your input but i've just resolved the problem as follows (i have had forgotten the EXISTS keyword for a moment): update tmp

Re: updating table based on other table values

2004-08-05 Thread Philippe Poelvoorde
DebugasRu wrote: PP> try: PP> update tmpISM,ta PP> set tmp.SUMA=tmp.SUMA-ta.SUMA PP> where (tmp.PID=ta.PID) and (tmp.PAJ=ta.PAJ) Does update work on more than one table ? Yes you can : http://dev.mysql.com/doc/mysql/en/UPDATE.html thank you for your input but i've just resolved the problem as f

Re: updating table based on other table values

2004-08-05 Thread Philippe Poelvoorde
DebugasRu wrote: Hello i can't figure out how to update the table tmpISM based on other table ta values. What i need i can intuitivly express as follows: update tmpISM set tmp.SUMA=tmp.SUMA-ta.SUMA where (tmp.PID=ta.PID) and (tmp.PAJ=ta.PAJ) try: update tmpISM,ta set tmp.SUMA=tmp.SUMA-ta.SUMA whe

updating table based on other table values

2004-08-05 Thread DebugasRu
Hello i can't figure out how to update the table tmpISM based on other table ta values. What i need i can intuitivly express as follows: update tmpISM set tmp.SUMA=tmp.SUMA-ta.SUMA where (tmp.PID=ta.PID) and (tmp.PAJ=ta.PAJ) index PID+PAJ is unique both for tmpISM and ta Any suggestions how the u