我在找一个答案其实是 select DISTINct A.[Product] as A
where EXISTS(select B.ParentProductCategoryID from [SalesLT].[ProductCategory] as B where A.ProductCategoryID=B.Prod
我有一个动态透视查询,它在条件语句中使用CSV值,并创建了一个函数( .I (“ABC,sd",",")),该函数拆分csv字符串并以表格形式返回,函数在' in‘子句条件下工作,但在' pivot’语句内除外insert into @filteredUsers select * from @users users (@IncludeInactiveUsers = 1 AND (value) F