Hi,
I have a sp and I need to append the dynamic where condition inside sp.
Here is my effort
ALTER Procedure [dbo].[sp_searchCities]
(
@Id int,
@where varchar(200)
)
as
begin
select id,City from thlCities @where
end
(
@Id int,
@where varchar(200)
)
as
begin
select id,City from thlCities @where
end
Here
@where = Where City = 'New York'
Can you suggest that how to append the dynamic where in sp

Manish KumarRank #1,622 · 956 reputationPosted Jun 20, 2017, 11:14 PM EDT