Passing delimited string to stored procedure to search database

Posted by rs on Stack Overflow See other posts from Stack Overflow or by rs
Published on 2010-05-19T14:44:59Z Indexed on 2010/05/19 15:10 UTC
Read the original article Hit count: 242

How can i pass a string delimited by space or comma to stored procedure and filter result? I'm trying to do something like -

Parameter      Value
--------------------------
@keywords      key1 key2 key3

Then is stored procedure i want to first

  1. find all records with first or last name like key1
  2. filter step 1 with first or last name like key2
  3. filter step 2 with first or last name like key 3

© Stack Overflow or respective owner

Related posts about sql-server

Related posts about sql-server-2000