IN requires a list, and a list does not require quotes around it. You may need quotes around each individual item in the list if they are not numeric though:
Bad:
...NAME IN ('Joe,Mike')...
Good:
...NAME IN ('Joe','Mike')...
"OK.I get what you mean. Do you have any idea to change the following input to the mentioned sample?
Input: Joe,Mike
Output: 'Joe','Mike'"
There are a number of ways to do it, from the simple "brute-force-and-ignorance" method:
Dim s As String = "joe,Mike"
Dim t As String = "'" & s.Replace(",", "','") & "'"
Which works, but any spaces in the input string may cause problems.
A better method uses Linq methods:
Dim s As String = "joe,Mike"
Dim t As String = String.Join(",", s.Split(","C).[Select](Function(f) "'" & f.Trim() & "'"))