RE: replace query + RTFM?
Hi Mike I really appreciate you getting back to me so quickly :) Can I just clarify this becuse I have over 4000 records and not all of the records have anything in items - description but there are about 2500 records with this exact text- br /A-Z Business Directory br /br / Please call 0116 27 960 41 for further details br /br / Replace these details with yours simply by calling 0116 27 960 41 br /br / Unlike YELL we only list a maximum of 5 businesses per Business Category br /br / The chances of your business being called has been increased already. Be Seen by calling 0116 27 960 41 or br /br /A HREF=http://www.punterspower.co.uk/register_online.php;registering online/Abr /br /ulliNo Web Site needed/liliNo Internet knowledge required/liliAll administration carried out by us/liliAll contacts forwarded to you/liliComprehensive Company details/liliLink to your own web site/liliYou can add html within your description making your profile suit/liliLogin access to administer and change you details whenever you need to/li/ul and it just the telephone I want to change :) so is the correct query REPLACE items SET description=new telphone number WHERE (old telephone number) Thank you so much Andrew PS what does RTFM mean? -Original Message- From: Mikael Fridh [mailto:[EMAIL PROTECTED] Sent: 17 November 2003 17:12 To: [EMAIL PROTECTED]; MySQL-Lista Subject: Re: replace query On Monday 17 November 2003 18.04, Andrew wrote: I have a MySQL database with records in a table that i would like to replace. The table is items and the field is description. I would like to replace the existing text within this filed with some new text. I did this before and it was successful but I have lost the query to do it :( Could someone shed some light in this please :) Andrew http://www.mysql.com/doc/en/Data_Manipulation.html REPLACE items SET description=RTFM WHERE ...(insert your where clause here) Mike -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.541 / Virus Database: 335 - Release Date: 14/11/2003 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: replace query + RTFM?
amazing, and you guys are errr intelligent!!! can't actually help but you can make an abbreviation for RTFM how fucking sad is that, what a bunch of pathetic losers. -Original Message- From: Rodolphe Toots [mailto:[EMAIL PROTECTED] Sent: 17 November 2003 18:11 To: [EMAIL PROTECTED] Subject: SV: replace query + RTFM? RTFM = read the fucking manual.. -Ursprungligt meddelande- Från: Andrew [mailto:[EMAIL PROTECTED] Skickat: den 17 november 2003 18:55 Till: Mikael Fridh; [EMAIL PROTECTED]; MySQL-Lista Ämne: RE: replace query + RTFM? Hi Mike I really appreciate you getting back to me so quickly :) Can I just clarify this becuse I have over 4000 records and not all of the records have anything in items - description but there are about 2500 records with this exact text- br /A-Z Business Directory br /br / Please call 0116 27 960 41 for further details br /br / Replace these details with yours simply by calling 0116 27 960 41 br /br / Unlike YELL we only list a maximum of 5 businesses per Business Category br /br / The chances of your business being called has been increased already. Be Seen by calling 0116 27 960 41 or br /br /A HREF=http://www.punterspower.co.uk/register_online.php;registering online/Abr /br /ulliNo Web Site needed/liliNo Internet knowledge required/liliAll administration carried out by us/liliAll contacts forwarded to you/liliComprehensive Company details/liliLink to your own web site/liliYou can add html within your description making your profile suit/liliLogin access to administer and change you details whenever you need to/li/ul and it just the telephone I want to change :) so is the correct query REPLACE items SET description=new telphone number WHERE (old telephone number) Thank you so much Andrew PS what does RTFM mean? -Original Message- From: Mikael Fridh [mailto:[EMAIL PROTECTED] Sent: 17 November 2003 17:12 To: [EMAIL PROTECTED]; MySQL-Lista Subject: Re: replace query On Monday 17 November 2003 18.04, Andrew wrote: I have a MySQL database with records in a table that i would like to replace. The table is items and the field is description. I would like to replace the existing text within this filed with some new text. I did this before and it was successful but I have lost the query to do it :( Could someone shed some light in this please :) Andrew http://www.mysql.com/doc/en/Data_Manipulation.html REPLACE items SET description=RTFM WHERE ...(insert your where clause here) Mike -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.541 / Virus Database: 335 - Release Date: 14/11/2003 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.541 / Virus Database: 335 - Release Date: 14/11/2003 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: replace query + RTFM?
Andrew, Please allow a small amount of grief to come from these lists... People are usually glad to help, and Mike sent the info that he knew to you. There is a certain amount of frustration that develops when people repeatedly ask questions of the mailing list that are clearly documented in the mysql documentation. Suggesting to read the manual is not a bad thing, and RTFM is a long stading acronym that nobody on this list invented, and I guarentee everyone on this list is guilty of asking a question that is in the documentation for some product / project they were working on. The MySQL documentation is, IMHO (in my humble opinion - another oldie acronym), incredibly good for a free product. Searching it for answers, particularly about syntax, should be everyone's, including my, first step in solving an issue that we're having. [getting down off of soap box] Dan Greene -Original Message- From: Andrew [mailto:[EMAIL PROTECTED] Sent: Monday, November 17, 2003 1:16 PM To: MySQL-Lista; Rodolphe Toots Subject: RE: replace query + RTFM? amazing, and you guys are errr intelligent!!! can't actually help but you can make an abbreviation for RTFM how f#$#$ng sad is that, what a bunch of pathetic losers. -Original Message- From: Rodolphe Toots [mailto:[EMAIL PROTECTED] Sent: 17 November 2003 18:11 To: [EMAIL PROTECTED] Subject: SV: replace query + RTFM? RTFM = read the fing manual.. -Ursprungligt meddelande- Från: Andrew [mailto:[EMAIL PROTECTED] Skickat: den 17 november 2003 18:55 Till: Mikael Fridh; [EMAIL PROTECTED]; MySQL-Lista Ämne: RE: replace query + RTFM? Hi Mike I really appreciate you getting back to me so quickly :) Can I just clarify this becuse I have over 4000 records and not all of the records have anything in items - description but there are about 2500 records with this exact text- br /A-Z Business Directory br /br / Please call 0116 27 960 41 for further details br /br / Replace these details with yours simply by calling 0116 27 960 41 br /br / Unlike YELL we only list a maximum of 5 businesses per Business Category br /br / The chances of your business being called has been increased already. Be Seen by calling 0116 27 960 41 or br /br /A HREF=http://www.punterspower.co.uk/register_online.php;registering online/Abr /br /ulliNo Web Site needed/liliNo Internet knowledge required/liliAll administration carried out by us/liliAll contacts forwarded to you/liliComprehensive Company details/liliLink to your own web site/liliYou can add html within your description making your profile suit/liliLogin access to administer and change you details whenever you need to/li/ul and it just the telephone I want to change :) so is the correct query REPLACE items SET description=new telphone number WHERE (old telephone number) Thank you so much Andrew PS what does RTFM mean? -Original Message- From: Mikael Fridh [mailto:[EMAIL PROTECTED] Sent: 17 November 2003 17:12 To: [EMAIL PROTECTED]; MySQL-Lista Subject: Re: replace query On Monday 17 November 2003 18.04, Andrew wrote: I have a MySQL database with records in a table that i would like to replace. The table is items and the field is description. I would like to replace the existing text within this filed with some new text. I did this before and it was successful but I have lost the query to do it :( Could someone shed some light in this please :) Andrew http://www.mysql.com/doc/en/Data_Manipulation.html REPLACE items SET description=RTFM WHERE ...(insert your where clause here) Mike -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.541 / Virus Database: 335 - Release Date: 14/11/2003 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.541 / Virus Database: 335 - Release Date: 14/11/2003 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: replace query + RTFM?
I understand what the manual is saying and I was asking for confirmation that what I was doing was indeed the right way forward, instead of going a head and potentially fucking up 2500 records! But alas it seems that people are repared to spend more time writing shite about reading manuals and reading manuals and how to read manual and acronymn and reading manual and areading manuals and reading manual and areading manuals and reading manual and areading manuals and reading manual and areading manuals and reading manual and areading manuals and reading manual and areading manuals and reading manual and areading manuals and reading manual and areading manualsand reading manual and areading manuals must remind myself I am human one day! -Original Message- From: Dan Greene [mailto:[EMAIL PROTECTED] Sent: 17 November 2003 18:31 To: [EMAIL PROTECTED]; MySQL-Lista; Rodolphe Toots Subject: RE: replace query + RTFM? Andrew, Please allow a small amount of grief to come from these lists... People are usually glad to help, and Mike sent the info that he knew to you. There is a certain amount of frustration that develops when people repeatedly ask questions of the mailing list that are clearly documented in the mysql documentation. Suggesting to read the manual is not a bad thing, and RTFM is a long stading acronym that nobody on this list invented, and I guarentee everyone on this list is guilty of asking a question that is in the documentation for some product / project they were working on. The MySQL documentation is, IMHO (in my humble opinion - another oldie acronym), incredibly good for a free product. Searching it for answers, particularly about syntax, should be everyone's, including my, first step in solving an issue that we're having. [getting down off of soap box] Dan Greene -Original Message- From: Andrew [mailto:[EMAIL PROTECTED] Sent: Monday, November 17, 2003 1:16 PM To: MySQL-Lista; Rodolphe Toots Subject: RE: replace query + RTFM? amazing, and you guys are errr intelligent!!! can't actually help but you can make an abbreviation for RTFM how f#$#$ng sad is that, what a bunch of pathetic losers. -Original Message- From: Rodolphe Toots [mailto:[EMAIL PROTECTED] Sent: 17 November 2003 18:11 To: [EMAIL PROTECTED] Subject: SV: replace query + RTFM? RTFM = read the fing manual.. -Ursprungligt meddelande- Från: Andrew [mailto:[EMAIL PROTECTED] Skickat: den 17 november 2003 18:55 Till: Mikael Fridh; [EMAIL PROTECTED]; MySQL-Lista Ämne: RE: replace query + RTFM? Hi Mike I really appreciate you getting back to me so quickly :) Can I just clarify this becuse I have over 4000 records and not all of the records have anything in items - description but there are about 2500 records with this exact text- br /A-Z Business Directory br /br / Please call 0116 27 960 41 for further details br /br / Replace these details with yours simply by calling 0116 27 960 41 br /br / Unlike YELL we only list a maximum of 5 businesses per Business Category br /br / The chances of your business being called has been increased already. Be Seen by calling 0116 27 960 41 or br /br /A HREF=http://www.punterspower.co.uk/register_online.php;registering online/Abr /br /ulliNo Web Site needed/liliNo Internet knowledge required/liliAll administration carried out by us/liliAll contacts forwarded to you/liliComprehensive Company details/liliLink to your own web site/liliYou can add html within your description making your profile suit/liliLogin access to administer and change you details whenever you need to/li/ul and it just the telephone I want to change :) so is the correct query REPLACE items SET description=new telphone number WHERE (old telephone number) Thank you so much Andrew PS what does RTFM mean? -Original Message- From: Mikael Fridh [mailto:[EMAIL PROTECTED] Sent: 17 November 2003 17:12 To: [EMAIL PROTECTED]; MySQL-Lista Subject: Re: replace query On Monday 17 November 2003 18.04, Andrew wrote: I have a MySQL database with records in a table that i would like to replace. The table is items and the field is description. I would like to replace the existing text within this filed with some new text. I did this before and it was successful but I have lost the query to do it :( Could someone shed some light in this please :) Andrew http://www.mysql.com/doc/en/Data_Manipulation.html REPLACE items SET description=RTFM WHERE ...(insert your where clause here) Mike -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.541 / Virus Database: 335 - Release Date: 14/11/2003 -- MySQL General Mailing List For list archives: http
RE: replace query + RTFM?
At 6:39 PM + 11/17/03, Andrew wrote: I understand what the manual is saying and I was asking for confirmation that what I was doing was indeed the right way forward, instead of going a head and potentially fucking up 2500 records! But alas it seems that people are repared to spend more time writing shite about reading manuals and reading manuals and how to read manual and acronymn and reading manual and areading manuals and reading manual and areading manuals and reading manual and areading manuals and reading manual and areading manuals and reading manual and areading manuals and reading manual and areading manuals and reading manual and areading manuals and reading manual and areading manualsand reading manual and areading manuals must remind myself I am human one day! Hmm... As far as I can tell, this thread began with you saying that you had a query to do what you want, but that you lost it and can someone help? I think you'll have to admit that we are not mind-readers, so we cannot tell you what your original query was. In any case, I do not think that REPLACE is what you want, if what you want to do is replace only the description column value. REPLACE requires values for all the columns; if you omit certain columns, MySQL will set them to their default values, which doesn't seem like what you want. Looks to me like you want to use UPDATE instead. Specify a WHERE clause that identifies the rows you want to update, and in the SET clause specify the new value for the description column. To pre-flight your UPDATE, you can write a SELECT that has the same WHERE clause. This will show you whether or not you are indeed identifying the proper rows. -Original Message- From: Dan Greene [mailto:[EMAIL PROTECTED] Sent: 17 November 2003 18:31 To: [EMAIL PROTECTED]; MySQL-Lista; Rodolphe Toots Subject: RE: replace query + RTFM? Andrew, Please allow a small amount of grief to come from these lists... People are usually glad to help, and Mike sent the info that he knew to you. There is a certain amount of frustration that develops when people repeatedly ask questions of the mailing list that are clearly documented in the mysql documentation. Suggesting to read the manual is not a bad thing, and RTFM is a long stading acronym that nobody on this list invented, and I guarentee everyone on this list is guilty of asking a question that is in the documentation for some product / project they were working on. The MySQL documentation is, IMHO (in my humble opinion - another oldie acronym), incredibly good for a free product. Searching it for answers, particularly about syntax, should be everyone's, including my, first step in solving an issue that we're having. [getting down off of soap box] Dan Greene -Original Message- From: Andrew [mailto:[EMAIL PROTECTED] Sent: Monday, November 17, 2003 1:16 PM To: MySQL-Lista; Rodolphe Toots Subject: RE: replace query + RTFM? amazing, and you guys are errr intelligent!!! can't actually help but you can make an abbreviation for RTFM how f#$#$ng sad is that, what a bunch of pathetic losers. -Original Message- From: Rodolphe Toots [mailto:[EMAIL PROTECTED] Sent: 17 November 2003 18:11 To: [EMAIL PROTECTED] Subject: SV: replace query + RTFM? RTFM = read the fing manual.. -Ursprungligt meddelande- Från: Andrew [mailto:[EMAIL PROTECTED] Skickat: den 17 november 2003 18:55 Till: Mikael Fridh; [EMAIL PROTECTED]; MySQL-Lista Ämne: RE: replace query + RTFM? Hi Mike I really appreciate you getting back to me so quickly :) Can I just clarify this becuse I have over 4000 records and not all of the records have anything in items - description but there are about 2500 records with this exact text- br /A-Z Business Directory br /br / Please call 0116 27 960 41 for further details br /br / Replace these details with yours simply by calling 0116 27 960 41 br /br / Unlike YELL we only list a maximum of 5 businesses per Business Category br /br / The chances of your business being called has been increased already. Be Seen by calling 0116 27 960 41 or br /br /A HREF=http://www.punterspower.co.uk/register_online.php;registering online/Abr /br /ulliNo Web Site needed/liliNo Internet knowledge required/liliAll administration carried out by us/liliAll contacts forwarded to you/liliComprehensive Company details/liliLink to your own web site/liliYou can add html within your description making your profile suit/liliLogin access to administer and change you details whenever you need to/li/ul and it just the telephone I want to change :) so is the correct query REPLACE items SET description=new telphone number WHERE (old telephone number) Thank you so much Andrew PS what does RTFM mean? -Original Message- From: Mikael Fridh [mailto:[EMAIL PROTECTED] Sent: 17 November 2003 17:12 To: [EMAIL PROTECTED]; MySQL-Lista Subject: Re: replace query
RE: replace query + RTFM?
Looks to me like you want to use UPDATE instead. Specify a WHERE clause that identifies the rows you want to update, and in the SET clause specify the new value for the description column. To pre-flight your UPDATE, you can write a SELECT that has the same WHERE clause. This will show you whether or not you are indeed identifying the proper rows. thank you paul Indeed I think you are right and if memory serves me correct you supplied my solution the first time ;) I thought I had saved the query for the next time I needed it! As it happens I can't find it. I'll have a read on the UPDATE and see if I can work it out. Thank you Andrew -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: replace query + RTFM?
Can someone kindly tell me what I doing wrong and help with this query? I want to replace / update the text for every record within table items field ItemDescription. This is what I have so far and its isn't corroect :( UPDATE items SET ItemDescription='A-Z Business Directory br /br / Please call 0870 199 4080 for further details br /br / Replace these details simply by calling 0870 199 4080 br /br / Unlike YELL we only list a maximum of 5 businesses per Business Category br /br / The chances of your business being called has been increased already. Be Seen by calling 0870 199 4080' WHERE 'A-Z Business Directory br /br / Please call 0116 27 960 41 for further details br /br / Replace these details simply by calling 0116 27 960 41 br /br / Unlike YELL we only list a maximum of 5 businesses per Business Category br /br / The chances of your business being called has been increased already. Be Seen by calling 0116 27 960 41' Andrew -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: replace query + RTFM?
you need to tell mysql what field to equate to the value in your where clause: update items set ItemDescription = 'new text' where ItemDescription = 'old text' replacing the items with the text you have below -Original Message- From: Andrew [mailto:[EMAIL PROTECTED] Sent: Monday, November 17, 2003 4:19 PM To: [EMAIL PROTECTED]; Mikael Fridh; MySQL-Lista Subject: RE: replace query + RTFM? Can someone kindly tell me what I doing wrong and help with this query? I want to replace / update the text for every record within table items field ItemDescription. This is what I have so far and its isn't corroect :( UPDATE items SET ItemDescription='A-Z Business Directory br /br / Please call 0870 199 4080 for further details br /br / Replace these details simply by calling 0870 199 4080 br /br / Unlike YELL we only list a maximum of 5 businesses per Business Category br /br / The chances of your business being called has been increased already. Be Seen by calling 0870 199 4080' WHERE 'A-Z Business Directory br /br / Please call 0116 27 960 41 for further details br /br / Replace these details simply by calling 0116 27 960 41 br /br / Unlike YELL we only list a maximum of 5 businesses per Business Category br /br / The chances of your business being called has been increased already. Be Seen by calling 0116 27 960 41' Andrew -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
Re: replace query + RTFM?
On Monday 17 November 2003 01:18 pm, Andrew wrote: Can someone kindly tell me what I doing wrong and help with this query? I want to replace / update the text for every record within table items field ItemDescription. This is what I have so far and its isn't corroect :( UPDATE items SET ItemDescription='A-Z Business Directory br /br / Please call 0870 199 4080 for further details br /br / Replace these details simply by calling 0870 199 4080 br /br / Unlike YELL we only list a maximum of 5 businesses per Business Category br /br / The chances of your business being called has been increased already. Be Seen by calling 0870 199 4080' WHERE ItemDescription= 'A-Z Business Directory br /br / Please call 0116 27 960 41 for further details br /br / Replace these details simply by calling 0116 27 960 41 br /br / Unlike YELL we only list a maximum of 5 businesses per Business Category br /br / The chances of your business being called has been increased already. Be Seen by calling 0116 27 960 41' should do it. gabe. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
RE: replace query + RTFM?
Worked like a dream Dan Thanks Paul for being patient :) Thank you Andrew -Original Message- From: Dan Greene [mailto:[EMAIL PROTECTED] Sent: 17 November 2003 21:27 To: [EMAIL PROTECTED]; Mikael Fridh; MySQL-Lista Subject: RE: replace query + RTFM? you need to tell mysql what field to equate to the value in your where clause: update items set ItemDescription = 'new text' where ItemDescription = 'old text' replacing the items with the text you have below -Original Message- From: Andrew [mailto:[EMAIL PROTECTED] Sent: Monday, November 17, 2003 4:19 PM To: [EMAIL PROTECTED]; Mikael Fridh; MySQL-Lista Subject: RE: replace query + RTFM? Can someone kindly tell me what I doing wrong and help with this query? I want to replace / update the text for every record within table items field ItemDescription. This is what I have so far and its isn't corroect :( UPDATE items SET ItemDescription='A-Z Business Directory br /br / Please call 0870 199 4080 for further details br /br / Replace these details simply by calling 0870 199 4080 br /br / Unlike YELL we only list a maximum of 5 businesses per Business Category br /br / The chances of your business being called has been increased already. Be Seen by calling 0870 199 4080' WHERE 'A-Z Business Directory br /br / Please call 0116 27 960 41 for further details br /br / Replace these details simply by calling 0116 27 960 41 br /br / Unlike YELL we only list a maximum of 5 businesses per Business Category br /br / The chances of your business being called has been increased already. Be Seen by calling 0116 27 960 41' Andrew -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.541 / Virus Database: 335 - Release Date: 14/11/2003 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]