How do I limit subqueries to 3 selects for each query selected, for
example, an operator put in 5 orders in each batch, and there are 2
different reports which is accuracy for all orders and 3 out of each 5
orders processed.

QA table holds batch information and Batch table holds all order information.

SQL statement:

SELECT 
        QA.ID,Batch.'order' 
FROM 
        QA,Batch
WHERE 
        Batch.QAID=QA.ID;

Table QA

ID      Batch   Date    
1       1000    2005-05-06      
2       1001    2005-05-06


Table batch
QAID    Order
1       123456789
1       123456790
1       123456791
1       123456792
1       123456793
2       123456794
2       123456795
2       123456796
2       123456797
2       123456798



Desired Result

QAID    Order
1       123456789
1       123456790
1       123456791
2       123456794
2       123456795
2       123456796
-- 
Power to people, Linux is here.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to