I have table1 :col1, col2, col3 and table2: col1, col2, col3
My goal is to get all records
where
t2.col1 like t1.col1 and
t2.col2 like t1.col2 and
t2.col3 like t1.col3
........................................
One variant is the inner join method
select * from t2 inner join t1 on
t2.col1 like t1.col1 and
t2.col2 like t1.col2 and
t2.col3 like t1.col3
........................................
Another variant is a stored procedure based on the 'where' clause:
select * from t2
where t2.col1 like parameter1 and
t2.col2 like parameter2 and
t2.col3 like parameter3
Then I call the procedure in VBA and I use a for next loop to go through all values/parameters from an excel table1
........................................
Execution time for the join method is slower(~20, 30%) than vba+sp method, but unfortunately, for a big set of parameters, excel freeze.
........................................
Is possible to apply loop method and go thru table1 values, as parameters for the stored procedure, inside sql server, in a sql script, no vba or c++ or perl etc. ?
I am a user with no access to db/tables design.
Thank you

col1,col2, andcol3have wildcards in them? If not, why are you usingLIKE? Also, what exactly is your question here? What you ask at the bottom is very vague, but to answer your question "Is possible to apply loop method and go thru table1 values, as parameters for the stored procedure, inside sql server, in a sql script, no vba or c++ or perl etc. ? ": Yes, you can loop inside SQL Server; however, generally it's a bad idea, a data set approached will almost always be faster.'Green%Yellow%Red', however, that would mean your expression would be something like'Green%Yellow%Red' LIKE 'Green', which would evaluate to false. If my guess is also true, however, you have a major problem with your design model.'%value1%' LIKE 'value1'will evaluate to false. I think you need to post some sample data here, expected results, and expand on your question here. We have too little to go on right now. How to post data for a T-SQL Question