Queries

Tracey Rylatt

Registered User.
Local time
Today, 18:31
Joined
Jul 14, 2008
Messages
13
Hi

I have created a query which gives me errors for orders received.

The query is fine except that I have one order which has 100 lines on and when I pull the query instead of just giving me that one order with the one error it gives me 100 lines with the same error. I need it to give me one line per error per order so if an order has 1 line but 3 errors I need the 3 lines with the different error types but if I have 1 order with 100 lines and the same error I need it to give me 1 line with 1 error. How can this be done?

Thanks.

Tracey
 
Try doing "Select Distinct"

If that doesnt work we need more information on what the EXACT query is...
 
If the error is attached to the line, then build a query that just includes the lines table and retrieve all the lines with errors. Then build a second query and add the first query and the orders table. Depending on whether you show the lines in the results this will allow you to show either one record per order with an error, or one record per line with an error, including the order details.
 

Users who are viewing this thread

Back
Top Bottom