简体   繁体   中英

SSRS Dataset - An expression of non-boolean type specified in a context where a condition is expected, near ','

I am trying to make a report and I have the problem in the @myTab parameter that I need multiple selections to be able to select several or all the elements and be able to know which country it belongs to, the problem occurs when I select more than one element, this is the query I'm overlooking

select [CompanyName],[ContactName],[Country] from [Customers] 
    
       where [Customers].ContactName in (@myTab) and [Customers].Country=@pais or 
    
       [Customers].Country=@pais and @myTab is null

This is because of @myTab is null condition(we can't check multi-valued parameters directly with "is null"), Try removing this and validate again. One more thing is that, be sure about "and" and "Or" conditions - Use proper brackets to avoid data issues

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM