I need to create a BAQ that would look at Purchase orders that were placed in a current month (or selected date range) and based on part results it the search would pull all PO’s for parts in interest. I was able to display the data but of course the data repeats. I’m not good with the joint types but I think that would be what I need to correct. Any help would be very much appreciated
Thank you very much for your fast response. The reason I did that was that I have to run first search for particular date range and then based on those results I run a second search for part Numbers from the first search.
Basically what I am looking for is: For all PO’s placed in lets say January, I need to search for PO history for the purchased part… hope I explained myself
I need to see PO’s placed in January and then compare them to previous placed for the same part. We have about 25000 parts and many POs I want only get back Pos related to parts from first search.
Why not create a subquery to get the parts in POs from the date range, using the “distinct” result set option to limit rows, and then use that subquery as criteria for the main search? Something like “where PartNum in (subquery)”.
Thank you Ashley, that is exactly what I ended up doing, I found that on youtube. The only thing I don’t understand is the difference between All rows and Distinct results. I don’t seem to see the difference in the search results. Your help is very much appreciated, thank you again.
Sorry for the late reply! “Distinct” excludes any rows that have the exact same contents as any other row. If a single column has different values, then the row will be included.
So for this subquery, because it’s only used to filter part numbers, you would only include the part number in the Display Fields and check Distinct. Then you’ll get a single row in the subquery results for each part, even if there were a hundred POs for the part. You won’t see a difference in the number of top query results, but you might see a difference in performance.
Put another way, it’s the difference between “where PartNum in (‘A’, ‘A’, ‘A’, ‘B’, ‘B’)” and “where PartNum in (‘A’, ‘B’)”.