Christian, Saturday, August 31, 2002, 11:09:47 AM, you wrote: CL> I have just upgraded to mysql 4 to be able to perform delete queries CL> with join statement. I have a simple query where I would like to delete CL> a number of rows in tabel t1 depending on id's found in table t2. This CL> doesn't seem to work and I just don't understand why!?
CL> mysql> delete icl from ca_x_ind_com_lvl as icl, ca_individual as ind CL> where icl.ind_id = ind.ind_id and ind.acc_id_id = @acc_id; CL> ERROR 1066: Not unique table/alias: 'icl' CL> Where @acc_id is set by: set @acc_id = 2; CL> What am I doing wrong? Use real table name after DELETE, i.e. DELETE ca_x_ind_com_lvl FROM ca_x_ind_com_lvl AS icl, ca_individual AS ind WHERE icl.ind_id = ind.ind_id AND ind.acc_id_id = @acc_id; -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http://www.ensita.net/ __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Egor Egorov / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net <___/ www.mysql.com --------------------------------------------------------------------- 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