| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Christian Mack | Date: | March 31 1999 5:22pm |
| Subject: | Re: How to UPDATE from field in other table | ||
| View as plain text | |||
Eric Berg wrote: > > I'm trying to update a field in tableA to a value in a field in tableB based > on a common key. I get "ERROR 1109: Unknown table 'tableB' in field list" > errors each time. > > update tableA > set somefield=tableB.otherfield > where tableA.keyfield=tableB.keyfield; > > How do I work around this? > > -Eric. Hi Eric The above is illegal SQL, because UPDATE uses only one table. Try the REPLACE ... SELECT ... syntax. Tschau Christian
| Thread | ||
|---|---|---|
| • How to UPDATE from field in other table | Eric Berg | 31 Mar |
| • Re: How to UPDATE from field in other table | Christian Mack | 31 Mar |
| • Re: How to UPDATE from field in other table | Eric Berg | 1 Apr |
| • Re: How to UPDATE from field in other table | Sasha Pachev | 1 Apr |
| • Re: How to UPDATE from field in other table | Eric Berg | 1 Apr |
| • Re: How to UPDATE from field in other table | Eric Berg | 1 Apr |
| • Re: How to UPDATE from field in other table | Thimble Smith | 1 Apr |
