What about the following? mysql> create table test (txt varchar(255)) Type=MyISAM; Query OK, 0 rows affected (0.00 sec)
mysql> insert into test values('Some Text\0and some more'); Query OK, 1 row affected (0.00 sec) mysql> select * from test; *************************** 1. row *************************** txt: Some Text 1 row in set (0.00 sec) mysql> update test set txt = replace(txt,'\0','NUL'); Query OK, 1 row affected (0.00 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql> select * from test; *************************** 1. row *************************** txt: Some TextNULand some more 1 row in set (0.00 sec) Cheers, Thomas Spahni On Thu, 10 Feb 2005, zzapper wrote: > On Thu, 10 Feb 2005 10:17:00 +0000, wrote: > > >Hi, > >I've successfully used the following update-replace statement to replace > >strings in mysql data > > > >update tbl_county_lookup set countyname=replace(countyname,'&','and') ; > > > >However I've had problems trying to replace a null character 0x00h , > > > >I'd be interested to know the syntax to filter null characters. > > > >Secondly I'd be interested in a general filter for non-ascii. > > > >cheers > Can't believe I'm the only one who's ever had this problem, I've googled and > just found a few fellow > searchers!! > > (I will probably have to dump the db and use a perl script!) > > zzapper (vim, cygwin, wiki & zsh) > -- > > vim -c ":%s%s*%CyrnfrTfcbafbeROenzSZbbyranne%|:%s)[R-T]) )Ig|:norm G1VGg?" > > http://www.vim.org/tips/tip.php?tip_id=305 Best of Vim Tips -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]