I have always assumed the following, perhaps incorrectly:
- Let's say I have a stored procedure called a_stored_procedure taking 5 input parameters param1 to param5 (data types do not matter in this case).
- If I want to use the same stored procedure in a OLE DB Command in two pacakges, packageA and pacakageB, with packageA using param1 to param3 and packageB using all parameters - i.e., param1 to param5.
- I have to create the stored procedure with param4 and param5 having NULL values by default. Something like,
CREATE PROCEDURE a_stored_procedure @param1 INT ,@param2 INT ,@param3 INT ,@param4 INT = NULL ,@param5 INT = NULL
If I do not do that, SSIS will complain that all the parameters are not mapped.
In a nutshell, I have always assumed that if I wanted to overload the interface of a stored procedure I had to use the design pattern above.
Have I gone wrong anywhere so far?
Kind regards M