List:General Discussion« Previous MessageNext Message »
From:SenTnel Date:June 4 2008 1:34am
Subject:Re: INSERTing values in empty fields
View as plain text  
 :clap:  Thanks !!!



Wm Mussatto wrote:
> 
> On Tue, June 3, 2008 16:05, SenTnel wrote:
>>
>> Hi all!
>>
>> My database has a lot of empty fields in the "street" column, meaning
>> that
>> a
>> lot of streets has no name registered, they're just plain blank.
>>
>> What I would like to do is to INSERT something like "N/A" (Not Available)
>> in
>> every field that is empty in the "street" column, but don't know exactly
>> the
>> SQL statemet to tell:
>>
>> "In mytable, street column, insert 'N/A' in every empty space"
>>
>> Thanks!!
> update mytable set street='N/A' where (rtrim(street)='' or street is NULL)
> 
> I always do a
> select * from mytable where  (rtrim(street)='' or street is NULL) limit 10
> 
> as a test first.
> 
> ------
> William R. Mussatto
> Systems Engineer
> http://www.csz.com
> 909-920-9154
> 
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql?unsub=1
> 
> 
> 
:clap::clap::clap::jumping:
-- 
View this message in context:
http://www.nabble.com/INSERTing-values-in-empty-fields-tp17635818p17637377.html
Sent from the MySQL - General mailing list archive at Nabble.com.

Thread
INSERTing values in empty fieldsSenTnel4 Jun
  • Re: INSERTing values in empty fieldsWm Mussatto4 Jun
    • Re: INSERTing values in empty fieldsSenTnel4 Jun