I have a behemoth of a BAQ that uses a CTE/Union recursive call to create a table. This query uses a part number as a “SubQuery Criteria” Parameter. I would like to run this using a list of parts with all the outputs of the BAQ in union (or summed together). Is this possible? I don’t mind using custom code as this only needs to execute once.
And for the love of god, name your subqueries the next time!
2 Likes
Thanks for the information! I am getting the error Must ‘declare the scalar variable “@MoM_Part_Number”’ when I try to cast(@MoM_Part_Number as varchar(50)) I know this is wrong as I am trying to cast a list of varchars into a single varchar bucket however, I do not know how to fix it. Any ideas?
Thanks again,
Change your Criteria from “=” to “IN” When you do that you’ll be able to choose the list parameter that @Banderson had you create.
2 Likes