Click here to Skip to main content
16,021,041 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am new to sql.

I want to create a procedure that splits the incoming string with respect to space and apply 'AND' between each of the word and retrive the ('%'like'%') rows from a table.

Can anyone help me.

Thanks
Posted
Updated 24-Jan-11 22:30pm
v2
Comments
Dalek Dave 25-Jan-11 4:30am    
Edited for Readability.

1 solution

 
Share this answer
 
Comments
Dalek Dave 25-Jan-11 4:31am    
Good Link.
Wild-Programmer 25-Jan-11 4:40am    
Thanks Dave :)
karthi34 27-Jan-11 12:53pm    
Thanks Dave. Here i Want to pass a the table in side LIKE. Is it possible? here the query..
select * from tablename where f1 LIKE(select * from function_name(@param)).

I tried using IN but it results only exact matching but i need to have AND operation between the table values returned by the sub query .

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900