List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:January 24 2002 5:51pm
Subject:Re: Problem with UPDATE and User Variables
View as plain text  
At 18:32 +0100 1/24/02, Peter Bremer wrote:
>Hi,
>
>Can anybody explain why the following does not work?
>
>   SELECT @variable := value1;
>   UPDATE table SET field1 = @variable WHERE field2 = value2;
>
>The result is always that field1 is set to NULL...

Works for me, if I substitute a real value for value1.  Your
first statement as shown above isn't actually legal.  How do
you establish what value1 is?

>
>Regards,
>	Peter Bremer

Thread
Problem with UPDATE and User VariablesPeter Bremer24 Jan
  • Re: Problem with UPDATE and User VariablesPaul DuBois24 Jan
RE: Problem with UPDATE and User VariablesPeter Bremer24 Jan