如何在SQL Server中将长存储过程写为子存储过程
嗨
我的存储过程很长.
它具有64个条件.
Iam根据64个条件检索数据.
是否可以在一个存储过程中写入64个条件?
或有其他任何方法吗?
例如:-
我有6个参数.这些是
位置,日期,Jobindustry,Jobterm,Minsal,maxsal
Iam根据我的条件检索数据,例如所有参数均为null或选择任意一个或选择任意两个或选择任意三个或任意四个或任意五个或全部选择.
我如何将其写为子存储过程????
Hi
My stored procedure is very long.
It has 64 conditions.
Iam retrieving the data based on 64 conditions.
Is it possible to write 64 conditions in one stored procedure????
or any other method is there??
For Example:-
I have 6 parameters.Those are
Location,Date,Jobindustry,Jobterm,Minsal,maxsal
Iam retrieving the data based on my conditions like all parameters are null or any one is select or any two are select or any three or any four or any five or all select.
how can i write that as sub storedprocedures?????
您可以使用exec调用存储过程,
因此,请尝试吐出它,并相应地传递所需的参数,然后调用它们.
You can use exec to call a stored procedure,
So try to spit it, and pass the required parameter accordingly and call them.