drop proc test2
create proc test2 @line varchar(8000)
declare @sql varchar(8000)
select @sql='select ''ok'' where ''A'' in('+@line+')'
I assume you are going to use this in a dynamic SQL statement?
You say you got a syntax error. Did you remember to put single quotes before and after the string (as snail illustrates), as well as around the commas?
I find it helpful in debugging dynamic code to construct the code in a variable and then PRINT the variable immediately before executing it. If you do this and you are still having problems, post your SQL so that we can review it.