Professional Web Applications Themes

Error #1064 when applying Replace function - MySQL

So I have a field called "fulltext" that is of medium text type. I'm trying to apply a global text string replace, and in the past I have had success with the following syntax: update [table_name] set [field_name] = replace( [field_name], '[string_to_find]', '[string_to_replace]' ); I can apply this with no problem to a varchar field, however the global replacement that I need to execute is on a mediumtext type -- so far I'm generating 1064 MySQL errors when I run this: update `mos_content` SET fulltext = REPLACE(fulltext,'this text','that text'); Thanks for any suggestions! Chuck...

  1. #1

    Default Error #1064 when applying Replace function

    So I have a field called "fulltext" that is of medium text type. I'm
    trying to apply a global text string replace, and in the past I have
    had success with the following syntax:

    update [table_name]
    set [field_name] = replace(
    [field_name],
    '[string_to_find]',
    '[string_to_replace]'
    );

    I can apply this with no problem to a varchar field, however the
    global replacement that I need to execute is on a mediumtext type --
    so far I'm generating 1064 MySQL errors when I run this:

    update `mos_content`
    SET fulltext =
    REPLACE(fulltext,'this text','that text');

    Thanks for any suggestions!

    Chuck

    Chuck Guest

  2. #2

    Default Re: Error #1064 when applying Replace function

    On 30 Apr, 16:45, Chuck W1CEW <com> wrote: 

    My first suggestion is that you post the error message. The message
    tells us what is wrong. That is why they have them!

    Captain Guest

  3. #3

    Default Re: Error #1064 when applying Replace function

    Chuck W1CEW wrote: 

    run that baby like this:
    update `mos_content` SET `fulltext` = REPLACE(`fulltext`,'this','that')

    it'll work.
    lark Guest

  4. #4

    Default Re: Error #1064 when applying Replace function

    On Apr 30, 12:12 pm, lark <net> wrote: 

    Woo hoo! That works. Thanks VERY much!

    Chuck Guest

Similar Threads

  1. mysql, dreaded error 1064
    By che10234@hotmail.com in forum MySQL
    Replies: 2
    Last Post: March 27th, 04:29 AM
  2. Error 1064 on 'SET PASSWORD'
    By gmoudry@gmail.com in forum MySQL
    Replies: 2
    Last Post: January 2nd, 09:03 PM
  3. ERROR 1064 in mySQL 5.0.27
    By avidfan in forum MySQL
    Replies: 2
    Last Post: December 31st, 05:55 AM
  4. ERROR 1064 when trying to load dump from sql file
    By docw@globetrotter.net in forum MySQL
    Replies: 3
    Last Post: October 22nd, 09:56 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139