Andrew Kuebler wrote:
How would I write an UPDATE query to SET Column3 to "John Doe" withoutYou'll probably have to do a SELECT query into a temporary table, then a REPLACE INTO to fill in the data.
selecting the information and reposting it to the data through an UPDATE
for each and every record?
CREATE TEMP TABLE UpdateCol3 SELECT Column1, Column2, Column1 + " " + Column2 as Column3 FROM table;
REPLACE INTO table (Column1, Column2, Column3) SELECT Column1, Column2, Column3 FROM UpdateCol3;
... if you have a primary key on 'table', include it in the select so that it replaces the correct rows.
--
Michael T. Babcock
C.T.O., FibreSpeed Ltd.
http://www.fibrespeed.net/~mbabcock
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php