I have a problem when inserting a string of numbers into sql query
SELECT *
FROM tablename a
WHERE a.flokkurid IN (3857,3858,3863,3285)
ORDER BY
That's not how parameters work. You cannot specify a "set" as a parameter, you have to assemble the SQL query in the string. And watch out for SQL Injection.
In addition, you might want to take a look at these:
Update
Codo's answer has a very interesting approach for Oracle. I cannot test it right now, but it sure looks promising.
There's a very similar question here: OracleParameter and IN Clause , as pointed out by @DCookie. It's not an exact duplicate because when the type of the item in array changes, the SQL cast also changes.