Split/explode comma delimited string field into SQL query
I don't actually have a sybase system to test with, but according to http://dcx.sybase.com/1200/en/dbreference/sa-split-list-sysproc.html the following solution should work:

SELECT * 
  FROM table AS T
  JOIN sa_split_list('1234,23,56,576,1231,567,122,87876,57553,1216') AS L
    ON T.id = L.row_value;


If the id_list is actually stored in another table (say list_table) you need to also use a CROSS APPLY operator (http://dcx.sybase.com/1101/en/dbusage_en11/apply-joins-joinsasp.html):

SELECT *
  FROM list_table AS LT
 CROSS APPLY sa_split_list(LT.id_list) L
  JOIN table T
    ON T.id = L.row_value
   AND &lt;optional: some other condition that ties rows in list_table to rows in table, like a group membership or location&gt;


This all requires that only numbers are part of these list as the split pieces will be automatically cast to the datatype of the id column. If that is not the case you can use this simpler, but slower technique:

SELECT *
  FROM table
 WHERE ','+@id_list+',' LIKE '%,'+CAST(id AS VARCHAR(20))+',%'


That last example assumed that the id list is in a variable @id_list. if it is in another table you can use the same CROSS APPLY technique from above. The additional commata make sure that the first or last entry can be matched.