I am currently working on a project which collects a list of IDs (belonging to 2 tables) from a user selection, which requires further filtering based on whatever the user has selected. In order to do this, I need to send a collection of IDs as a parameter (comma separated values) to the stored procedure. But as I understand, a SQL Server stored procedure can only accept up to 4000 characters in a parameter, beyond which it truncates them...
Is there any way I could efficiently do this without a lot of overhead on the database and without having to cache anything in the client side?
Thanks for your suggestions.