• In the example given, @parameterID holds a list of IDs in sequence and there is no break in the sequence.

    Could you resolve your issue by finding Categorys between the first and last IDs.

    Alternatively, why not process the string into a temp table using string slicing and then use in (select categoryID from #temptable) instead of the long text string of @parameterID

    Obiron