I am re-writing an old BAQ I wrote for product groups my customers do not buy. And due to our current way of using the Product groups, I was forced to use the Brands in the attributes in Part MAint.
Waht I ahve done is the follwoing (Thisis the 5th differnt configuration I have tried):
select
[Part1].[PartNum] as [Part1_PartNum]
from Erp.Part as Part1
where Part1.CommercialBrand = ANY (select Part_CommercialBrand from ((select
[InvcDtl].[CustNum] as [InvcDtl_CustNum],
[Part].[CommercialBrand] as [Part_CommercialBrand]
from Erp.InvcDtl as InvcDtl
inner join Erp.Part as Part on
Part.Company = InvcDtl.Company
And
Part.PartNum = InvcDtl.PartNum
and ( Part.CommercialBrand <> ‘’ )
where (InvcDtl.ShipDate >= DATEADD (year, -3, GETDATE()))
group by [InvcDtl].[CustNum],
[Part].[CommercialBrand])) as Part Brands)
When I restrict the Sub Criteria is gives me the error of Incorrect Syntax near ‘Brands’ Any ideas why I am getting this error? I’ve tried everything I can think of.