elucero
asked on
where clause for ssrs parameter
I'm choosing a data set based on an ssrs parameter @Location. I need to be able to select 'ALL' with all the values. I need help adding it to the following query.
--this query works I need to add 'ALL'
select Location, [City],[State], DOB from BC_Detail as a
where (case when @Location = 'East' then [Location_East]
when @Location = 'West' then [Location_West]
when @Location = 'South' then [Location_South]
when @Location = 'South' then [Location_North] end) =1
I want to add 'when @Location = 'All' then [Location_East],[Location_ West],[Loc ation_Sout h],[Locati on_North]' then 1 to the above select statement
--this query works I need to add 'ALL'
select Location, [City],[State], DOB from BC_Detail as a
where (case when @Location = 'East' then [Location_East]
when @Location = 'West' then [Location_West]
when @Location = 'South' then [Location_South]
when @Location = 'South' then [Location_North] end) =1
I want to add 'when @Location = 'All' then [Location_East],[Location_
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.