Witango-Talk: Looking for a little SQL help (OT)

2011-02-08 Thread Fogelson, Steve
Hi, Database is MySQL. Having a brain fart today. I want to update all occurrences of ® to ™ in a field, but leave the rest of the field intact. I believe this would set the filed to ™ UPDATE Category SET Cat_Name = '™' WHERE Cat_Name LIKE '%®%'; Thanks Steve Fogelson --

Re: Witango-Talk: Looking for a little SQL help (OT)

2011-02-08 Thread Robert Garcia
Thats going to replace the entire field with ‘™’. So if the field 'Text ® Some Product', you query will change it to just '™' You are either going to have to create a more sophisticated regex query, or write a program or script to loop through and do this. -- Robert Garcia President - BigHead

Re: Witango-Talk: Looking for a little SQL help (OT)

2011-02-08 Thread Ben Johansen
try replace() http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_replace UPDATE Category SET Cat_Name = replace(Cat_Name,'®',‘™’) WHERE Cat_Name LIKE ‘%®%’; On Feb 8, 2011, at 1:55 PM, Fogelson, Steve wrote: > Hi, > > Database is MySQL. Having a brain fart today. I want to u

RE: Witango-Talk: Looking for a little SQL help (OT)

2011-02-08 Thread Fogelson, Steve
Looks like what I am looking for. I will test it out. Thanks Ben _ From: Ben Johansen [mailto:b...@webspinr.com] Sent: Tuesday, February 08, 2011 4:17 PM To: Witango-Talk@witango.com Subject: Re: Witango-Talk: Looking for a little SQL help (OT) try replace() http

RE: Witango-Talk: Looking for a little SQL help (OT)

2011-02-08 Thread Fogelson, Steve
Witango-Talk@witango.com Subject: Re: Witango-Talk: Looking for a little SQL help (OT) try replace() http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_replac e <http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_repla ce> UPDATE Category SET Cat

Re: Witango-Talk: Looking for a little SQL help (OT)

2011-02-08 Thread Ben Johansen
d numerous variations of the UPDATE sql, but with no luck. Any ideas > would be appreciated. > > Thanks > > Steve > From: Ben Johansen [mailto:b...@webspinr.com] > Sent: Tuesday, February 08, 2011 4:17 PM > To: Witango-Talk@witango.com > Subject: Re: Witango-Talk: Look