Tech
Forums
Jobs
Books
Events
Live
Interviews
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
append dynamic where condition inside sp
Ajay Mavatkar
Jun 21 2017 2:02 AM
215
Reply
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
Here
@
where =
Where City = 'New York'
Can you suggest that how to append the dynamic where in sp
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
Get top 10 records from sp
Stored procedure - Only return if rows > 0