RE: MySQL Command to edit a single record

2002-12-21 Thread Jim Hankins
Jeff, Are you looking for an update table syntax? Example Update tablename Set FullName=Their Full Name where someotherfield=someother value; Careful with this one. As if you omit the where clause it will update every record! -Original Message- From: Jeffrey Ellis [mailto:[EMAIL

RE: MySQL Command to edit a single record

2002-12-21 Thread Adolfo Bello
The following query adds NAME and ADDRESS (where the last name is wrongly placed) and set ADDRESS to an empty string. UPDATE tablename SET FullName=CONCAT(FullName,Address),Address='' WHERE ID=the register id Adolfo On Sat, 2002-12-21 at 17:07, Jim Hankins wrote: Jeff, Are you looking for

Re: MySQL Command to edit a single record

2002-12-21 Thread Jeffrey Ellis
Hi, Adolfo-- Thank you! But I have two problems here...First, I (whoops!) don't have an id field. In the program I use, you can only set a key field when you first create the database. I would love to have an id field, but don't know how to create one now. :( The second is that the command will

Re: MySQL Command to edit a single record

2002-12-21 Thread Adolfo Bello
CONCAT(FullName,' ',Address) regarding the lack of an ID field, create a new table with all the fields from the original table plus an ID field, auto_numeric, and insert the registers from the old table to the new one. Then, use the UPDATE on the new table. Adolfo On Sat, 2002-12-21 at 17:35,

Re: MySQL Command to edit a single record

2002-12-21 Thread Jeffrey Ellis
Hi, Adolfo-- Thank you again! However, the problem is, the table is linked to a file on the web. If I create a new table with a different name the link wont work and no data will be entered. Is there a way to rename a table once you create it? Then, I could delete the old table after I create

Re: MySQL Command to edit a single record

2002-12-21 Thread Adolfo Bello
Look in the manual the ALTER TABLE command. I don't remember the syntax but it can be done. Adolfo On Sat, 2002-12-21 at 18:56, Jeffrey Ellis wrote: Hi, Adolfo-- Thank you again! However, the problem is, the table is linked to a file on the web. If I create a new table with a different

Re: MySQL Command to edit a single record

2002-12-21 Thread Jeffrey Ellis
Thanks, Adolfo! I appreciate very much you taking the time to help me:) All My Best, Jeffrey on 12/21/02 3:10 PM, Adolfo Bello at [EMAIL PROTECTED] wrote: Look in the manual the ALTER TABLE command. I don't remember the syntax but it can be done. Adolfo On Sat, 2002-12-21 at 18:56,