I have a sales data view which returns the data from a transaction table as well as the items that are related to those transactions:
SELECT [items].[Type], [items].[Value], [items].[Name], [transactions].[Number]
FROM [log].[transactions] INNER JOIN
[log].[items] on [items].[transactionID] = [transactions].[ID]
However, the need has arisen for the view to return only specific types of items in specific circumstances. What I would like to be able to do is INNER JOIN to the view, but passing in a specific list of item types... Is there any way that I can achieve this functionality without creating a view for each of the item type combinations that are available?
(seeder)