List:General Discussion« Previous MessageNext Message »
From:Peter Brawley Date:November 30 2005 10:12pm
Subject:Re: Newbie Question on Update
View as plain text  
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

Thread
Newbie Question on UpdateJoseph Kraer30 Nov
  • Re: Newbie Question on UpdateMichael Stassen30 Nov
  • RE: Newbie Question on UpdateISC Edwin Cruz30 Nov
  • Re: Newbie Question on UpdateSGreen30 Nov
  • RE: Newbie Question on Updatemel list_php30 Nov
  • Re: Newbie Question on UpdatePeter Brawley30 Nov
RE: Newbie Question on UpdateJoseph Kraer30 Nov