From: Peter Brawley Date: November 30 2005 10:12pm Subject: Re: Newbie Question on Update List-Archive: http://lists.mysql.com/mysql/192361 Message-Id: <438E23CA.6030601@earthlink.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Joseph >update table >set column5 = number1 >where column 1 = number2 >and column1 = number3 >but it is not working. I tried listing the conditions separated by >commas (where column 1 = number2, column1 = number3) and also didn't >work. What am I doing wrong? No commas in the WHERE clause. WHERE ... AND ... ' 'Where column 1 = ...' is wrong. If by 'column 1' you mean 'column1', your condition can hold only when number2=number3, in which case the 'and' clause is apparently superfluous. Otherwise, you'll have to tell us what you mean by "not working". PB ----- Kraer, Joseph wrote: >I am trying to update a couple of rows in a table by doing the >following: > >update table >set column5 = number1 >where column 1 = number2 >and column1 = number3 > >but it is not working. I tried listing the conditions separated by >commas (where column 1 = number2, column1 = number3) and also didn't >work. What am I doing wrong? > >Thanks in advance, > >Joseph "Tito" Kraer >Business Systems Analyst >Taylor, Bean & Whitaker Mortgage Corp > > > > > -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.362 / Virus Database: 267.13.10/189 - Release Date: 11/30/2005