Hi, You can use Insert into Suggestion (column 1, column 2, column 3, ......) SELECT partnumber,qty from Sales order by qty desc limit 1,100
Regards, Laercio. -----Original Message----- From: C.F. Scheidecker Antunes [mailto:[EMAIL PROTECTED] Sent: quinta-feira, 29 de julho de 2004 19:01 To: [EMAIL PROTECTED] Subject: Inserting records from one table to another respecting a condition Hello all, I have two mysql tables. They have a slightly different structure but share comom columns. I need to get the top 100 sold parts ( partnumbers and quantities) from table Sales and insert into table Suggestion if I issue a query : SELECT partnumber,qty from Sales order by qty desc limit 1,100 I would satisfy my need of retrieving the top 100 sold Items from Sales. Then, I need to insert into Suggestion so that I can have an estimate suggestion of purchase. How can I achieve it? Thanks in advance. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]