The simple solution we used was to add a user-defined function which returns a table [ ufn_GetIDs(@inputstring varchar(7000)) ] Then, in sp, you can do
-------------------------------------------------
create proc (@inputpara varchar(7000))
as
select field2 from tableA where
field1...