RE: how to replace this data in a complex field?

2012-08-01 Thread Rick James
In other words, this might work?? UPDATE Table1 SET Inventory = REPLACE(Inventory, '"ACRE_PRC119_ID_29"', '"ACRE_PRC119"'); Note: the extra quotes were deliberate. If it is not always ID_29, then the problem is more difficult. > -Orig

Re: how to replace this data in a complex field?

2012-07-31 Thread Johan De Meersman
- Original Message - > From: "Incarus Derp" > > I have a complex field named Inventory in a table named Table1 that > can be different every time and is not guaranteed to contain what I need to > replace. > > [["Thing1","Thing4&qu

Re: how to replace this data in a complex field?

2012-07-30 Thread Mihamina Rakotomandimby
On 07/31/2012 09:07 AM, Incarus Derp wrote: I need to replace ACRE_PRC119_ID_29 with ACRE_PRC119 and I cannot do this externally. I have PREG_REPLACE but I'm not sure how I would apply this to the database because it only SELECT's as far as I know. You could CREATE a TABLE from

how to replace this data in a complex field?

2012-07-30 Thread Incarus Derp
I have a complex field named Inventory in a table named Table1 that can be different every time and is not guaranteed to contain what I need to replace. [["Thing1","Thing4","thing8","thing1","thing942","ACRE_PRC119_ID_29"],[["thing

Re: UPDATE triggers with REPLACE statements

2012-01-23 Thread Hal�sz S�ndor
;> > In the MySQL documentation, we find this tantalizing statement: > > "It is possible that in the case of a duplicate-key error, a storage engine > may perform the REPLACE as an update rather than a delete plus insert, but > the semantics are the same. There are no user-visible e

Re: UPDATE triggers with REPLACE statements

2011-12-19 Thread Hal�sz S�ndor
>>>> 2011/12/19 13:55 -0800, Jim McNeely >>>> Anyway, I just thought I would share. BTW I experimented, and innoDB does updates and fires off update triggers for REPLACE statements, but MyISAM does delete/inserts. <<<<<<<< Thank you. Which versio

Re: UPDATE triggers with REPLACE statements

2011-12-19 Thread Jim McNeely
t; > "It is possible that in the case of a duplicate-key error, a storage engine > may perform the REPLACE as an update rather than a delete plus insert, but > the semantics are the same. There are no user-visible effects other than a > possible difference in how the storage

Re: UPDATE triggers with REPLACE statements

2011-12-19 Thread Hal�sz S�ndor
>>>> 2011/12/19 11:30 -0800, Jim McNeely >>>> In the MySQL documentation, we find this tantalizing statement: "It is possible that in the case of a duplicate-key error, a storage engine may perform the REPLACE as an update rather than a delete plus insert, but the

Re: UPDATE triggers with REPLACE statements

2011-12-19 Thread Jim McNeely
With REPLACE, you just set up the query the same as an INSERT statement but otherwise it just works. With ON DUPLICATE UPDATE you have to set up the whole query with the entire text all over again as an update. The query strings for what I'm doing are in some cases pushing enough te

Re: UPDATE triggers with REPLACE statements

2011-12-19 Thread Claudio Nanni
Good to know and good that you took time to read the manual, good approach. But why bother with REPLACE if you will go with INSERT.ON DUPLICATE KEY UPDATE? The storage engine is a property of your table and you can set it and/or change it, it is the low-level layer (physical) of the database

Re: UPDATE triggers with REPLACE statements

2011-12-19 Thread Jim McNeely
In the MySQL documentation, we find this tantalizing statement: "It is possible that in the case of a duplicate-key error, a storage engine may perform the REPLACE as an update rather than a delete plus insert, but the semantics are the same. There are no user-visible effects other t

Re: UPDATE triggers with REPLACE statements

2011-12-19 Thread Jim McNeely
Perfect!! This is the answer I was looking for. Thanks! I didn't know about this. Jim McNeely On Dec 18, 2011, at 11:26 AM, Claudio Nanni wrote: > Only if you can change the application you could use INSERTON DUPLICATE > KEY UPDATE instead of REPLACE. > > Check Peter&

Re: UPDATE triggers with REPLACE statements

2011-12-18 Thread Claudio Nanni
Only if you can change the application you could use INSERTON DUPLICATE KEY UPDATE instead of REPLACE. Check Peter's post here: http://kae.li/iiigi Cheers Claudio 2011/12/17 Jim McNeely > Here is a fun one! > > I have a set of tables that get populated and changed a lo

Re: UPDATE triggers with REPLACE statements

2011-12-17 Thread Hal�sz S�ndor
>>>> 2011/12/16 16:00 -0800, Jim McNeely >>>> I have a set of tables that get populated and changed a lot from lots of REPLACE statements. Now, I need an ON UPDATE trigger, but of course the trigger never gets triggered because REPLACES are all deletes and inserts.

UPDATE triggers with REPLACE statements

2011-12-16 Thread Jim McNeely
Here is a fun one! I have a set of tables that get populated and changed a lot from lots of REPLACE statements. Now, I need an ON UPDATE trigger, but of course the trigger never gets triggered because REPLACES are all deletes and inserts. The trigger is going to populate another table as a

Re: Increase for 1 using REPLACE function

2011-03-18 Thread S�ndor Hal�sz
>>>> 2011/03/18 17:24 -0500, Afan Pasalic >>>> I have to increase 'no_of_visits' for 1. Using UPDATE function is easy: update visits set no_of_visits=no_of_visits+1 where visitor_id=123 but, how it should be (if possible at all) if I want to use REPLACE fu

Increase for 1 using REPLACE function

2011-03-18 Thread Afan Pasalic
I have to increase 'no_of_visits' for 1. Using UPDATE function is easy: update visits set no_of_visits=no_of_visits+1 where visitor_id=123 but, how it should be (if possible at all) if I want to use REPLACE function? I tried something similar replace into visitors values ($

Re: update replace() regex

2010-07-08 Thread Egor Shevtsov
Thanks Dan, I tested it just now. It works perfectly. Dan Nelson wrote: In the last episode (Jul 08), Egor Shevtsov said: I wonder if possible at all to use replace() together with regex in update statement. I want to be able to update a field of string values and replace a '

Re: update replace() regex

2010-07-08 Thread Dan Nelson
In the last episode (Jul 08), Egor Shevtsov said: > I wonder if possible at all to use replace() together with regex in update > statement. I want to be able to update a field of string values and > replace a 'dash' character with a space in the string. Something like: > U

update replace() regex

2010-07-08 Thread Egor Shevtsov
Hi ALL, I wonder if possible at all to use replace() together with regex in update statement. I want to be able to update a field of string values and replace a 'dash' character with a space in the string. Something like: UPDATE table SET column = replace(column, regex '%-%&

Re: How to "REPLACE" updating when it's a subset of the primary key what is duplicated or inserting otherwise?

2009-10-07 Thread Fer C.
ses would >> be: >> >> a) record "(a1,a2),a3"  exists and has a matching "a1" >> --update-to-->    "(a1,b2),b3" >> b) there doesn't exist any record matching a1 >> insert--->      "(a1,b2),a3" > > So, > &

Re: How to "REPLACE" updating when it's a subset of the primary key what is duplicated or inserting otherwise?

2009-10-07 Thread ewen fortune
xists and has a matching "a1" > --update-to-->    "(a1,b2),b3" > b) there doesn't exist any record matching a1 > insert--->      "(a1,b2),a3" So, INSERT INTO table (a,b,c) VALUES (1,2,3) ON DUPLICATE KEY UPDATE b=2,c=3; Ewen > &g

How to "REPLACE" updating when it's a subset of the primary key what is duplicated or inserting otherwise?

2009-10-07 Thread Fer C.
ecord "(a1,b2),b3" the two cases would be: a) record "(a1,a2),a3" exists and has a matching "a1" --update-to-->"(a1,b2),b3" b) there doesn't exist any record matching a1 insert---> "(a1,b2),a3" This would be trivial if th

Re: Properly Use Replace Command

2009-07-29 Thread Carlos Williams
On Wed, Jul 29, 2009 at 3:07 PM, Nathan Sullivan wrote: > Carlos, > > I think this does what you want: (untested though) > > UPDATE identities > SET email=replace(email, 'mail.', '') > WHERE email like '%mail.iamghost.com' That worked perfect!

RE: Properly Use Replace Command

2009-07-29 Thread Nathan Sullivan
Carlos, I think this does what you want: (untested though) UPDATE identities SET email=replace(email, 'mail.', '') WHERE email like '%mail.iamghost.com' Regards, Nathan -Original Message- From: Carlos Williams [mailto:carlosw...@gmail.com] Sent: Wedne

Properly Use Replace Command

2009-07-29 Thread Carlos Williams
l'. Some people have the wrong email address listed so I would like to replace the invalid entry 'u...@mail.iamghost.com' to the correct value 'u...@iamghost.com' mysql> select email from identities where email like ('%mail.iamghost.com'); I ran the above com

Re: if there're a tool which can replace mysql-proxy?

2009-03-24 Thread Claudio Nanni
Great, thanks guys, I think after subqueries,triggers , stored procs and views is the most awaited thingie now! Cheers Claudio 2009/3/24 Jimmy Guerrero > Forgot to post the URL in the event you are interested: > > http://www.mysql.com/news-and-events/web-seminars/display-306.html > > -- Jimm

Re: if there're a tool which can replace mysql-proxy?

2009-03-24 Thread Jimmy Guerrero
Forgot to post the URL in the event you are interested: http://www.mysql.com/news-and-events/web-seminars/display-306.html -- Jimmy Jimmy Guerrero wrote: Hello, One additional note in regards to learning more about the current state of MySQL Proxy and connecting with Proxy developers... Ch

Re: if there're a tool which can replace mysql-proxy?

2009-03-24 Thread Jimmy Guerrero
Hello, One additional note in regards to learning more about the current state of MySQL Proxy and connecting with Proxy developers... Check out the "Simulating Workload with MySQL Proxy" webinar on April 2, with Giuseppe Maxia, MySQL Community Lead and Diego Medina, Quality Assurance Engineer

Re: if there're a tool which can replace mysql-proxy?

2009-03-24 Thread Mark Matthews
On Mar 24, 2009, at 8:06 AM, Claudio Nanni wrote: Question: Hello Claudio, my company tried the mysql-proxy about one year ago(may be more) but could not use it for not being multithreaded. They say they spoke to the 'mysql-proxy' developer. Is this still true? Are there any limitation

Re: if there're a tool which can replace mysql-proxy?

2009-03-24 Thread Claudio Nanni
lations. > > On Tue, Mar 24, 2009 at 4:26 AM, Moon's Father > wrote: > > Hi. > > I want to know if there're a tool which can act as the same funciton as > > the mysql-proxy? > > > > Now we have a customer who want to use mysql-proxy, but he is

Re: if there're a tool which can replace mysql-proxy?

2009-03-24 Thread Baron Schwartz
ch can act as the same funciton as > the mysql-proxy? > > Now we have a customer who want to use mysql-proxy, but he is afraid of its > alpha version. > So I want to know if there're another tool that can replace it? > > Any reply is appreciated. > > > -- &

Re: Global search and replace utility

2008-10-09 Thread Rob Wultsch
On Thu, Oct 9, 2008 at 4:21 PM, mike cantor <[EMAIL PROTECTED]> wrote: > Does anyone know of a utility that can go through a set of tables (or every > table) in a MySql database and preform a global search and replace (i.e. > replace every instance "string1" in a text fiel

Global search and replace utility

2008-10-09 Thread mike cantor
Does anyone know of a utility that can go through a set of tables (or every table) in a MySql database and preform a global search and replace (i.e. replace every instance "string1" in a text field with "string2"). Or is there a super clever query that accomplishes this?

Re: Update replace / Operand should contain 1 column(s) 1241

2008-07-15 Thread Rob Wultsch
On Tue, Jul 15, 2008 at 7:59 AM, Guenter Ladstaetter <[EMAIL PROTECTED]> wrote: > UPDATE `phpbt_bug` > SET title = REPLACE (phpbt_bug.title,"ö","ö") > WHERE bug_id IN > (select bug_id, title from phpbt_bug where `title` LIKE "%ö%"); > > >

Update replace / Operand should contain 1 column(s) 1241

2008-07-15 Thread Guenter Ladstaetter
Hello, i'm trying to replace german umlauts by using a simple update replace statement but can't find the syntax error: UPDATE `phpbt_bug` SET title = REPLACE (phpbt_bug.title,"ö","ö") WHERE bug_id IN (select bug_id, title from phpbt_bug where `title` LIKE

RE: replace chr(10) in field

2008-05-15 Thread Neil Tompkins
I've overcome the problem by using a RichText memo box. Thanks for your help in any case. Neil > From: [EMAIL PROTECTED]> To: [EMAIL PROTECTED]> CC: mysql@lists.mysql.com> > Subject: RE: replace chr(10) in field> Date: Wed, 14 May 2008 19:18:07 +> >

RE: replace chr(10) in field

2008-05-14 Thread Neil Tompkins
o: [EMAIL > PROTECTED]> CC: mysql@lists.mysql.com> Subject: Re: replace chr(10) in field> > > Neil Tompkins wrote:> > Hi,> > > > I've got some data in our fields which > contain a carriage return 'chr(10)', as saved using a ASP page. I

replace chr(10) in field

2008-05-14 Thread Neil Tompkins
Hi, I've got some data in our fields which contain a carriage return 'chr(10)', as saved using a ASP page. I'm now trying to extract the information from a different system, however the saved chr(10) are showing as binary values. What would be the best way for my to rep

Re: Replace on Join

2007-10-29 Thread Peter Brawley
How about this ... update schedule s join directory d on s.email = replace(d.email, '@wnc.edu', '@wncc.edu') set s.email=replace(s.email, '@wncc.edu', '@wnc.edu' ); PB - Kevin Murphy wrote: I'm trying to do a join on two pieces of data that ar

Replace on Join

2007-10-29 Thread Kevin Murphy
iated version of the query that is trying to match them, and it doesn't work. Any suggestions? SELECT * FROM schedule LEFT JOIN directory ON ( REPLACE('@wncc.edu','@wnc.edu',schedule.email) = directory.email ) -- Kevin Murphy Webmaster: Information and Mar

JOIN to replace column?

2007-05-24 Thread Andreas Iwanowski
Hello MySQL community, I have a table that contains a foreign key, e.g. ID - Local unique key UserID - Foreign key Data Is it possible to do a JOIN on the Users table to replace UserID with the name of the user, as in the Name column of the Users table? I've tried several JOINS, but I JOI

Re: Replace, Substitute, Delete

2007-05-09 Thread Scott Haneda
> Instead of individual replacements, as in ... > > SELECT REPLACE('De Long', ' ', ''); > > would this global approach work? > > SELECT REPLACE(imgName,' ','') FROM staff WHERE imgName REGEXP ' '; I just used th

Re: Replace, Substitute, Delete

2007-05-09 Thread Scott Haneda
> (1) I thought it might be quicker than Perl or PHP. Correct me if I'm wrong. > > (2) I have read a short description of Triggers, and I thought these > three lines of code might be an excellent AFTER INSERT trigger. (I > don't know enough about Triggers yet to know if they'll even take multiple

Re: Replace, Substitute, Delete

2007-05-09 Thread John Kebbel
Instead of individual replacements, as in ... SELECT REPLACE('De Long', ' ', ''); would this global approach work? SELECT REPLACE(imgName,' ','') FROM staff WHERE imgName REGEXP ' '; -- MySQL General Mailing List Fo

Re: Replace, Substitute, Delete

2007-05-09 Thread John Kebbel
John Meyer wrote ... "you may want to do a perl script to find and replace the spaces." Scott Haneda wrote ... "I would move your html and string parse logic into php," If I'm doing data entry for individuals via a web page, Java

Re: Replace, Substitute, Delete

2007-05-09 Thread John Meyer
or van scxx.jpg for my image names. > I have a superstitious dread of putting spaces in Linux/Unix web file > names. Could someone suggest a way to replace the " " in imgName with > ""? > > STEP 1: Create the root of the image name > update staff set

Re: Replace, Substitute, Delete

2007-05-09 Thread Scott Haneda
5'>",first," ",last,""); > > Thanks in advance for your time spent in reading or responding. Personally, I would move your html and string parse logic into php, rather than in mysql, but that is up to you. If you want to do this in mysql..

Replace, Substitute, Delete

2007-05-09 Thread John Kebbel
itious dread of putting spaces in Linux/Unix web file names. Could someone suggest a way to replace the " " in imgName with ""? STEP 1: Create the root of the image name update staff set imgName = Lower(CONCAT(Left(last,6),Left(first,2))); STEP 2: How do I delete spaces in

BEFORE trigger abd REPLACE

2007-05-04 Thread Michael Dykman
We have come across an interesting anomoly in MySQL behaviour in the course of our investigations. It seems that when A table is equiped with both BEFORE INSERT and BEFORE DELETE triggers and a REPLACE statement is used against that table, the INSERT trigger is fired first and the DELETE trigger

Re: replace / insert into with sum not working

2007-04-18 Thread Tanner Postert
man <[EMAIL PROTECTED]> wrote: > > yeah, it sure looks like a bug. What version of MySQL are you > ruinning? I haven't used REPLACE in a long time but the plain old > SELECT like you have specified above is a form I use very often and I > have never seen it fail. > >

Re: replace / insert into with sum not working

2007-04-18 Thread Tanner Postert
yntax of the original poster was the braces around the select statement itself. Drop them and it should work fine. Now the REPLACE might be more elegantly handled with a INSERT...ON DUPLICATE KEY UPDATE.. construct, but that wasn't the question... On 4/17/07, Baron Schwartz <[EMAIL PROTECTED]>

Re: replace / insert into with sum not working

2007-04-17 Thread Michael Dykman
. Now the REPLACE might be more elegantly handled with a INSERT...ON DUPLICATE KEY UPDATE.. construct, but that wasn't the question... On 4/17/07, Baron Schwartz <[EMAIL PROTECTED]> wrote: Hi Tanner, Tanner Postert wrote: > i'm using the following query: > > REPLACE IN

Re: replace / insert into with sum not working

2007-04-17 Thread Baron Schwartz
Hi Tanner, Tanner Postert wrote: i'm using the following query: REPLACE INTO vviews_total( SELECT uuser_id, sum( vviews.views ) AS views, sum( vviews.embeds ) AS embeds, sum( vviews.plinks ) AS plinks, sum( vviews.`30d` ) AS 30d, sum( vviews.`7d` ) AS 7d, sum( vviews.`24h` ) AS 24h

replace / insert into with sum not working

2007-04-17 Thread Tanner Postert
i'm using the following query: REPLACE INTO vviews_total( SELECT uuser_id, sum( vviews.views ) AS views, sum( vviews.embeds ) AS embeds, sum( vviews.plinks ) AS plinks, sum( vviews.`30d` ) AS 30d, sum( vviews.`7d` ) AS 7d, sum( vviews.`24h` ) AS 24h, sum( vviews.site30d ) AS site30d, sum( s

Re: Using replace with New Lines

2007-03-27 Thread Stephen Cook
I always go with REPLACE(REPLACE(STRING, '\n', ''), '\r', ''), since depending on where your data came from there may be one or the other, or both. Although if there is a shorthand/more efficient way I'd love to hear it. [EMAIL PROTECTED] wrote:

Re: Using replace with New Lines

2007-03-27 Thread Lucas . CTR . Heuman
Ok.. I found the problem.. I needed to add a \r.. but now that opens up the question can I have a Multi replace search in replace? Example can I do something like this in MySQL REPLACE (STRING,'\r' or '\n',' ') REPLACE(DESCRIPTION,'\r\n','

Using replace with New Lines

2007-03-27 Thread Lucas . CTR . Heuman
Hello Group, Looking to use this REPLACE to strip multi line data out of my return data. I am having problems getting the \n to work correctly, any ideas? REPLACE(DESCRIPTION,\n,' ') SELECT rpad(CASE WHEN DESCRIPTION IS NULL THEN '' ELSE REPLACE(DESCRIPTION,'\n&

Re: replace delayed not working

2006-08-24 Thread matt_lists
why did they change this? I reverted everything to 5.0.19 and I'm using load data infiles again, with zero locking issues It has always been like that. load data infile seems to use different logic from replace delayed, it does not lock at all What table type do you have in

Re: replace delayed not working

2006-08-23 Thread Chris
different logic from replace delayed, it does not lock at all What table type do you have in each version? -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: replace delayed not working

2006-08-23 Thread matt_lists
chris smith wrote: On 8/23/06, matt_lists <[EMAIL PROTECTED]> wrote: Not sure if this is a bug we are updating a large table with replace delayed from our feeder systems, 1000 records at a time using limit's on the input data pull this works great when there's fast select

Re: replace delayed not working

2006-08-23 Thread matt_lists
ry changing the table type on a test system and see if it helps/hinders your problem(s). why did they change this? I reverted everything to 5.0.19 and I'm using load data infiles again, with zero locking issues load data infile seems to use different logic from replace delayed, it

Re: replace delayed not working

2006-08-23 Thread chris smith
On 8/23/06, matt_lists <[EMAIL PROTECTED]> wrote: Not sure if this is a bug we are updating a large table with replace delayed from our feeder systems, 1000 records at a time using limit's on the input data pull this works great when there's fast selects from the table, whi

replace delayed not working

2006-08-23 Thread matt_lists
Not sure if this is a bug we are updating a large table with replace delayed from our feeder systems, 1000 records at a time using limit's on the input data pull this works great when there's fast selects from the table, while the insert is going when a site does a large pull,

Re: replace question...

2006-08-11 Thread Dan Buettner
Bruce, looks like you're missing join criteria, and so you're selecting a Cartesian product into your trgtTBL ... this this on for size: replace into trgtTBL (cat, dog) select t.cat, t.dog from fromTBL t, trgtTBL where trgtTBL.valid = 0 AND t.cat = trgtT

replace question...

2006-08-11 Thread bruce
hi... i've got an issue that i can't figure out... i'm trying to do a replace, where i only replace information from one tbl, into the targeted tbl, if the targeted tbl 'valid' item = 0; if the tbls are: fromTBL cat dog mouse tgtTBL cat dog mouse valid

Re: replace/temp tbl question...

2006-08-11 Thread Dan Buettner
Friday, August 11, 2006 8:13 AM To: [EMAIL PROTECTED] Cc: mysql@lists.mysql.com Subject: Re: replace/temp tbl question... Bruce, seems like this ought to work just fine. Dan On 8/11/06, bruce <[EMAIL PROTECTED]> wrote: > hi... > > can someone tell me if this should work in theor

RE: replace/temp tbl question...

2006-08-11 Thread bruce
thanks for the reply dan... but is there a better/more efficent way...> thanks -Original Message- From: Dan Buettner [mailto:[EMAIL PROTECTED] Sent: Friday, August 11, 2006 8:13 AM To: [EMAIL PROTECTED] Cc: mysql@lists.mysql.com Subject: Re: replace/temp tbl question... Br

Re: replace/temp tbl question...

2006-08-11 Thread Dan Buettner
hen like to do a complete replace/update on the values in the temp table. finally, i'd like to write everything in the replaced/updated tmp table back to the orignal tbl... i'm essentially using 3 steps to get this accomplished... create tmp table temp select a.appName, a.universi

Re[2]: insert/replace question...

2006-08-11 Thread Aleksandar Bradaric
Hi, > REPLACE is a special INSERT/UPDATE combination where you > dont specify a filter, it uses the primary key. If no existing record > exists, it INSERTs a new one, otherwise it UPDATEs an existing one. Just a quick note - REPLACE does not do any UPDATE. It is a combination of DE

Re: insert/replace question...

2006-08-11 Thread Brent Baisley
REPLACE is a special INSERT/UPDATE combination where you dont specify a filter, it uses the primary key. If no existing record exists, it INSERTs a new one, otherwise it UPDATEs an existing one. What you are looking for is the UPDATE command. - Original Message - From: "bruce&quo

replace/temp tbl question...

2006-08-10 Thread bruce
hi... can someone tell me if this should work in theory... basically, i'm looking to get a bunch of rows from my initial table, based on the value of a given column/field. i'd then like to do a complete replace/update on the values in the temp table. finally, i'd like to write ev

insert/replace question...

2006-08-10 Thread bruce
hi. i have the following that works... in that it does a replace on the row. replace into appTBL (appName, universityID) values(%s,%s)... i'm trying to figure out how to do the replace on the row if a given column is not equal to a certain value.. i

RE: Using replace on columns containing *

2006-06-27 Thread Eitan Gur
ur [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 27, 2006 5:27 PM To: mysql@lists.mysql.com Subject: RE: Using replace on columns containing * Hi J.R. Thanks for your response, but this did not help. If I try the same syntax on other values (not '*') I have no problem... -Original Me

RE: Using replace on columns containing *

2006-06-27 Thread Eitan Gur
RE: Using replace on columns containing * Part of the problem is that you have a ' ' in between your REPLACE and your (). The REPLACE function needs to have that space removed. SELECT REPLACE(deviceID,'*','.*') FROM MY_TABLE; Try that and see if it helps. J.R. -Origi

RE: Using replace on columns containing *

2006-06-27 Thread J.R. Bullington
Part of the problem is that you have a ' ' in between your REPLACE and your (). The REPLACE function needs to have that space removed. SELECT REPLACE(deviceID,'*','.*') FROM MY_TABLE; Try that and see if it helps. J.R. -Original Message- From: Eitan Gur [

Using replace on columns containing *

2006-06-27 Thread Eitan Gur
Hi all I have a column in a table containing strings with the '*' character. I'm trying to use the REPLACE command on this column: SELECT REPLACE (deviceId, '*', '.*') FROM MY_TABLE; But I get the following error: ERROR 1270 (HY000): Illegal m

Re: Search and Replace a word in memo field

2006-06-12 Thread Gabriel Mahiques
Thanks friends. Duncan Hill escribió: On Monday 12 June 2006 14:16, Gabriel Mahiques wrote: but I have a problem with this solution, because I have the words in the middle of the phrase. For example: Movie Kill Bill Vol 1 in "vhs" format, and I want to replace IT with Movie Kill

Re: Search and Replace a word in memo field

2006-06-12 Thread Duncan Hill
On Monday 12 June 2006 14:16, Gabriel Mahiques wrote: > but I have a problem with this solution, because I have the words in the > middle of the phrase. > For example: Movie Kill Bill Vol 1 in "vhs" format, and I want to > replace IT with Movie Kill Bill Vol 1 in "dvd&q

Re: Search and Replace a word in memo field

2006-06-12 Thread Gabriel Mahiques
but I have a problem with this solution, because I have the words in the middle of the phrase. For example: Movie Kill Bill Vol 1 in "vhs" format, and I want to replace IT with Movie Kill Bill Vol 1 in "dvd" format. In Another case I have: "VHS" Trade Konami. . an

Re: Search and Replace a word in memo field

2006-06-12 Thread Jo�o C�ndido de Souza Neto
update table set field=REPLACE(field, 'vhs', 'dvd'); "Gabriel Mahiques" <[EMAIL PROTECTED]> escreveu na mensagem news:[EMAIL PROTECTED] > Hello friends. > In need your help. > I have a table with a field "Name: Varchar(255)". > In t

Search and Replace a word in memo field

2006-06-12 Thread Gabriel Mahiques
Hello friends. In need your help. I have a table with a field "Name: Varchar(255)". In this field "Name" I have a detail and I need replace in all records a word for another. For example: I have "vhs" and I want to change the word "vhs" for the word

"Load Data Infile Replace ..." too slow

2006-06-11 Thread mos
I'm replacing 14 million rows of data using "Load data infile replace" and it is taking forever to complete. I killed it after 6.2 hours on an AMD 3500 machine. I then deleted all the data from the table and used "Load data infile ignore" and it completed quite quickly

Re: Easy regex replace?

2006-03-28 Thread Adam i Agnieszka Gąsiorowski FNORD
? (e.g. replace all '%20' with ' ' leaving the rest untouched?) You know that proverb - "For a man in possession of a hammer, everything looks like a nail". Don't do that. MySQL is *really slow* with Regular Expressions. It will be much easier to SELECT

RE: Easy regex replace?

2006-03-20 Thread Gordon
If "%20" are the actual characters in the varchar column you shuld be able to do UPDATE table SETcolumn_name =REPLACE(column_name,'%20',' '); You might have to use REPLACE(column_name,'\%20',' '); to force MySQL to treat "%" as an

Re: Easy regex replace?

2006-03-20 Thread Pooly
2006/3/19, Adam i Agnieszka Gąsiorowski FNORD <[EMAIL PROTECTED]>: > > On 2006-03-18, at 00:59, Yani Copas wrote: > > > > > Is there a quick and dirty way to update such that I can only > > affect the portion > > of a string (varchar column) that matches a r

Re: Easy regex replace?

2006-03-18 Thread Adam i Agnieszka Gąsiorowski FNORD
On 2006-03-18, at 00:59, Yani Copas wrote: Is there a quick and dirty way to update such that I can only affect the portion of a string (varchar column) that matches a regexp? (e.g. replace all '%20' with ' ' leaving the rest untouched?) You know that proverb - &quo

Easy regex replace?

2006-03-17 Thread Yani Copas
at was doing it, but now I need to cleanup the data. Is there a quick and dirty way to update such that I can only affect the portion of a string (varchar column) that matches a regexp? (e.g. replace all '%20' with ' ' leaving the rest untouched?) Yani -- MySQL Gene

RE: using replace() to remove tab chars

2006-03-01 Thread Vince LaMonica
On Wed, 1 Mar 2006, Price, Randall wrote: } Try the following: } } REPLACE(products_description, CHAR(9), " ") Thanks, Randall, that did it. And I feel quite stupid, as well, because I re-checked my two test entries [33 and 37] and both had had their tabs removed at some point. S

RE: using replace() to remove tab chars

2006-03-01 Thread Price, Randall
Try the following: REPLACE(products_description, CHAR(9), " ") Randall Price VT.SETI.IAD.MIG:Microsoft Implementation Group http://vtmig.vt.edu [EMAIL PROTECTED] -Original Message- From: Vince LaMonica [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 01, 2006 10:44 AM

RE: using replace() to remove tab chars

2006-03-01 Thread Vince LaMonica
On Wed, 1 Mar 2006, Vince LaMonica wrote: } update products_description set products_description = } replace(`products_description`,'\t',' ') where products_id = "37"; [snip] I should have also stated that in the above example, both the table name and the column

RE: using replace() to remove tab chars

2006-03-01 Thread Vince LaMonica
On Wed, 1 Mar 2006 [EMAIL PROTECTED] wrote: } [snip] } Does anyone have any suggestions? The mysql server [and client] are } running under Linux. The products_description field is a 'text' type. If } } there's further info you need, please let me know. } [/snip] } } Are yo

RE: using replace() to remove tab chars

2006-03-01 Thread jblanchard
[snip] Does anyone have any suggestions? The mysql server [and client] are running under Linux. The products_description field is a 'text' type. If there's further info you need, please let me know. [/snip] Are you using REPLACE(column_name, '\t', ' ') ? --

using replace() to remove tab chars

2006-03-01 Thread Vince LaMonica
Hi all, I am trying to use the replace() function in MySQL 4.1.13a to find and remove tab characters. I'm not sure how to signify the tab char, however. I've tried, "\t" to no avail: update products_description set products_description = replace(`products_descript

Re: LOAD DATA INFILE and SET REPLACE

2005-11-02 Thread Paul DuBois
At 23:46 +0100 11/2/05, John thegimper wrote: Why cant i get this to work? The name dont get replaced... :P LOAD DATA LOCAL INFILE '/tmp/myfile.txt' INTO TABLE cache FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n' IGNORE 1 LINES (name) SET name = REPLACE(name, &

LOAD DATA INFILE and SET REPLACE

2005-11-02 Thread John thegimper
Why cant i get this to work? The name dont get replaced... :P LOAD DATA LOCAL INFILE '/tmp/myfile.txt' INTO TABLE cache FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n' IGNORE 1 LINES (name) SET name = REPLACE(name, 'Coke', 'Pepsi'); --

RE: Global Replace

2005-09-30 Thread John Berman
Sound advice, I have no done as suggested and my application handles the Nulls's Thanks John B -Original Message- From: Sujay Koduri [mailto:[EMAIL PROTECTED] Sent: 30 September 2005 14:26 To: Scott Noyes; [EMAIL PROTECTED] Cc: mysql@lists.mysql.com Subject: RE: Global Replace

Re: Global Replace

2005-09-30 Thread SGreen
"John Berman" <[EMAIL PROTECTED]> wrote on 09/29/2005 06:05:42 PM: > Hi > > We have a database on MySql 4 and it contains many tables. In each field in > the table in the past were there was no data to display we simply left the > field blank, we now want to rep

RE: Global Replace

2005-09-30 Thread Sujay Koduri
ailto:[EMAIL PROTECTED] Sent: Friday, September 30, 2005 6:43 PM To: [EMAIL PROTECTED] Cc: mysql@lists.mysql.com Subject: Re: Global Replace > We have a database on MySql 4 and it contains many tables. In each > field in the table in the past were there was no data to display we > simply

Re: Global Replace

2005-09-30 Thread Scott Noyes
> We have a database on MySql 4 and it contains many tables. In each field in > the table in the past were there was no data to display we simply left the > field blank, we now want to replace a null entry with No Data I advise you to reconsider. You are reducing the flexibility and us

  1   2   3   4   >