Pass in user input to sql query execute query

I am new to UIPath and have tried all the answers that I found using google search. I need to take user input and append it to sql execute query as like. e.g. select wellname from tbl1 where wellname like ‘%userinput%’.
I tried “select wellname from tbl1 where wellname like '%” + wellname + “'” and “select wellname from tbl1 where wellname like '%” & wellname & “'” and “select wellname from tbl1 where wellname =@wellname” nothing works.

please help

@shanugoel,“select id from tbl1 where Source_id=@Source_ID_p”

Did you invoke the arguements and assigned it correctly.This query works for me

Thanks,
Sreekanth.k

Thanks. That worked. I had tried the parameter before but I did not setup correctly.

If i need to change this to a like statement then how will you code the select? I have tried “select id from tbl1 where Source_id like ‘" + @Source_ID_p + "%’" and also “select id from tbl1 where Source_id like ‘" & @Source_ID_p & "%’"