Re: Update table1 from table2

2002-04-26 Thread Donna Robinson
Hi, I am using MySql Ver ll.15 distrib. 3.23.41 I want to write an sql query something like: update ddata set ddata.pubkey = pubdata.pubkey, ddata.title=pubdata.title where ddata.dkey=pubdata.dkey; This generates an error: ERROR 1109: Unknown table 'pubdata' in where clause and using

RE: UPDATE table1 FROM table2

2001-11-02 Thread Steve Meyers
That's a dangerous solution. If there are more columns in test2 than ID and Value, the REPLACE will delete those values. As you noted in the manual, the old record is deleted before the new record is inserted. Multi-table updates should happen in 4.1, I think, which is due out fairly soon. If

RE: UPDATE table1 FROM table2

2001-11-02 Thread Steve Meyers
On Fri, 2001-11-02 at 09:57, Paul DuBois wrote: At 9:47 AM -0700 11/2/01, Steve Meyers wrote: That's a dangerous solution. If there are more columns in test2 than ID and Value, the REPLACE will delete those values. As you noted in the manual, the old record is deleted before the new record