Hi listers, using mysql 4.1.7 on SuSE Linux 9.1. I have a table containing config parameters for a web based application. this table has one particular row with the main key of "example". whenever a new customer joins this application, the registration application copies this example row and creates a new row in the same table with the main key identifying the new customer. this is done using php: i select the example row and insert it into the same table changing the main key. last week a new table entry gots corrupt, and i would have urgently needed a possibility to copy some columns (not all) from the example row into the new customer's row within the same table. I thought, that this is easily done using UPDATE ... SELECT ..., but after failing and searching quite a bit I found the last line in the UPDATE-syntax documentation saying: " Currently, you cannot update a table and select from the same table in a subquery." Also, there is no example of UPDATE ... SELECT in the docu. Therefore, I very much assume, that the UPDATE ... SELECT does not work at all in 4.1.7. I mean, I could have achieved it doing some php programming. But this is not what SQL is considered for. does anybody of you guys know a (sequence of) SQL statement(s), which would update some columns in a row with the values retrieved from another row withing the same table? or is this just impossible with 4.1.7? or am I just too stupid?
thanks very much for your attention.
schlubediwup
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]