INSERT INTO Suggestion SELECT partnumber,qty from Sales Limit 1,100;

DVP
----
Dathan Vance Pattishall     http://www.friendster.com


> -----Original Message-----
> From: C.F. Scheidecker Antunes [mailto:[EMAIL PROTECTED]
> Sent: Thursday, July 29, 2004 2:01 PM
> 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]

Reply via email to