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
- 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
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
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
;>
> 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
>>>> 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
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
>>>> 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
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
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
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
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&
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
>>>> 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.
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
>>>> 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
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 ($
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 '
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
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 '%-%&
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,
>
&
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
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
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!
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
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
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
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
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
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
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
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.
>
>
> --
&
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
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?
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 "%ö%");
>
>
>
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
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 +>
>
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
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
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
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
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
> 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
> (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
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
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
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
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..
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
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
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.
>
>
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]>
.
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
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
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
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:
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','
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&
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
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]
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
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
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
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,
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
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
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
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
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
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
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
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
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
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 *
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
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 [
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
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
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
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
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
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
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
?
(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
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
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
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
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
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
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
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
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
[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', ' ') ?
--
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
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, &
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');
--
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
"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
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
> 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 - 100 of 304 matches
Mail list logo