BAQ Search doesn't respect "Distinct" in search results

Hello all,

I created a BAQ for a search that selects active parts that have been run since 2016. My only selected field is Part Number and I have indicated “DISTINCT” within the subquery options to avoid multiple instances of the same part number.

1

When I run query within the BAQ Designer, I get distinct results. HOWEVER, when I run the actual BAQ Search within a search window, I get duplicate part numbers. Any thoughts? Is this just a limitation of BAQ searches?

Thanks,

Alice

please post the query phrase.

Thanks,

select distinct
[Part].[PartNum] as [Part_PartNum]
from Erp.Part as Part
inner join Erp.JobHead as JobHead on
Part.Company = JobHead.Company
And
Part.PartNum = JobHead.PartNum
and ( JobHead.DueDate >= ‘1/1/2016’ )

where (Part.InActive = false)
order by Part.PartNum

try removing the distinct and then select the group by checkbox for the partnum

It worked!! Thank you so much.

1 Like