At 6:39 PM +0000 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 f****ing 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</A><br /><br /><ul><li>No Web Site needed</li><li>No Internet
 >knowledge
 >required</li><li>All administration carried out by
 us</li><li>All contacts
 >forwarded to you</li><li>Comprehensive Company
 details</li><li>Link to your
 >own
 >web site</li><li>You can add html within your description making your
 >profile
 >suit</li><li>Login 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


--
Paul DuBois, Senior Technical Writer
Madison, Wisconsin, USA
MySQL AB, www.mysql.com

Are you MySQL certified? http://www.mysql.com/certification/


-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to