You almost got it. Your syntax will be something like this:
UPDATE Table SET address=REPLACE(address,'#','Number') WHERE column 
like"%#%"

When I am trying to figure out the syntax for something, I always add a 
LIMIT 1 at the end so that only one record gets changed.

On Saturday, October 5, 2002, at 12:45 AM, Scott Johnson wrote:

> I have a db with slightly over 614,000 records of names and addresses.  
> In
> the address column, there are quite a few records like
>
> "123 any rd # 2"
> "319 w. 1st st # B"
> "4321 test blvd # 42"
> etc
>
> I want to replace all the number signs with the actual word 'number'.
>
> Is there a SQL command I can use for this or do I need the help of a
> scripting language (php or vb)?
>
> I was trying to construct something like "update into table.column 
> select
> where column like '%#%' replace with '%number%'"
>
> but of course that is not going to work.  I am a SQL newb btw.
>
> Any help appreciated.
>
> Thanks
>
> Scott
>
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
>
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <mysql-unsubscribe-
> [EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>
>
--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search & Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to