How to refactor T-SQL stored procedure encapsulating it's parameters to a class

Posted by abatishchev on Stack Overflow See other posts from Stack Overflow or by abatishchev
Published on 2010-03-22T19:00:46Z Indexed on 2010/03/22 19:11 UTC
Read the original article Hit count: 290

On my SQL Server 2008 I have a stored procedure with a large number of parameters.

The first part of them is used in every call and parameters from the second part are used rarely. And I can't move the logic to two different stored procedures.

Is there a way to encapsulate all this parameters to a class or struct and pass it as a stored procedure parameter?

Can I use SQL CLR. Are there other ways?

© Stack Overflow or respective owner

Related posts about sql-server

Related posts about sql-server-2008