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! UPDATE identities -> SET email=replace(email, 'mail.'

RE: Properly Use Replace Command

2009-07-29 Thread Nathan Sullivan
sday, July 29, 2009 1:58 PM To: mysql@lists.mysql.com Subject: Properly Use Replace Command I know this seems very basic and I checked Google before posting but it appears that many of the manuals / guides online reference something a bit more extreme than what I am looking for. I am searching a ta

Properly Use Replace Command

2009-07-29 Thread Carlos Williams
I know this seems very basic and I checked Google before posting but it appears that many of the manuals / guides online reference something a bit more extreme than what I am looking for. I am searching a table called 'identities' and in that table there is a column called 'email'. Some people hav

Replace command

2002-09-05 Thread Mattias Persson
REPLACE command to replace a line with a unique combination of companyno, discountgroup? If a discount value don't exist for that company and discountgroup I want to insert one. I saw the REPLACE command and that seems perfect but is it possible with two diffrent columns? Can I do this with one

Re: UPDATE/REPLACE command

2001-06-30 Thread Rolf Hopkins
P.S. You could also UPDATE 4 first with the new value and then DELETE 2. - Original Message - From: "Rolf Hopkins" <[EMAIL PROTECTED]> To: "Artem Koutchine" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Sunday, July 01, 2001 15:03 Subject: Re: UPD

Re: UPDATE/REPLACE command

2001-06-30 Thread Rolf Hopkins
No there isn't. You'll need to DELETE first and then UPDATE. Ie. delete 4 first and then update 2. - Original Message - From: "Artem Koutchine" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, June 29, 2001 22:43 Subject: UPDATE/REPLACE comman

UPDATE/REPLACE command

2001-06-29 Thread Artem Koutchine
Hi! Was UPDATE/REPLACE command implemented? I mean, a command which does update and if it updated to record to match an already existing unique index then the old record is killed and the new stays. Example ( UPPLACE - UPDATE/REPLACE command): table: ids ID (primary key) NAME 1 a 2 b 3 c 4