List:General Discussion« Previous MessageNext Message »
From:Thomas McDonough Date:December 1 2004 2:32pm
Subject:Re: update and concat
View as plain text  
Someone else suggested that I remove all spaces before and after = and 
between CONCAT and (...).  This worked.  Too bad the manual is not more 
specific.
Thanks for your concern,
Tom

On Nov 30, 2004, at 7:14 PM, Michael Stassen wrote:

> At this point, what you say you are doing should work, but doesn't.  
> We cannot guess what's wrong.  Please enter your command,
>
>   UPDATE listings SET map = CONCAT(ML, '.png') WHERE ML <> '';
>
> get your error message, and then copy/paste the whole thing into your 
> next message.  That way, someone should spot the problem.
>
> Michael
>
> Thomas McDonough wrote:
>
>> That did not do it.  I'm still getting the same error message (?)
>> Tom
>> On Nov 30, 2004, at 2:09 PM, gerald_clark wrote:
>>>
>>>
>>> Thomas McDonough wrote:
>>>
>>>> I'm trying to set all the values of column 'map' to the value of 
>>>> column ML and '.png'.  My intuition and an extensive reading of the 
>>>> manual and mail archives tell me to do it like this:
>>>>
>>>> mysql> update listings set map= concat (ML, '.png') where
> ML<>'';
>>>
>>>
>>> mysql> update listings set map= concat(ML, '.png') where ML<>'';
>>> Lose the space between  'concat' and '('
>>>
>>>>
>>>>
>>>> but all I get is this:
>>>>
>>>> ERROR 1064 (42000): You have an error in your SQL syntax; check the 
>>>> manual that corresponds to your MySQL server version for the right 
>>>> syntax to use near '(ML, '.png') where ML<>''' at line 1
>>>>
>>>> What am I doing wrong?
>>>>
>>>> Tom
>>>>
>>>>
>>>
>>>
>

Thread
update and concatThomas McDonough30 Nov
  • Re: update and concatRoger Baklund30 Nov
  • Re: update and concatgerald_clark30 Nov
    • Re: update and concatThomas McDonough30 Nov
      • Re: update and concatMichael Stassen1 Dec
        • Re: update and concatThomas McDonough1 Dec
          • Re: update and concatMichael Stassen1 Dec