December 27, 2013 at 12:41 pm
Hi. I hope that everyone had a super holiday.
I have a sql store procedure that has input parameters of a starting and end dates, and 6 other input parameters such as warehouse,territory, distrib#, Pattern, Customer. The starting and end dates are required fields, but the rest of the fields are optional. What I want to do inside this stored procedure is that for example, they input the start and end date and the warehouse, I want to send these three parameters to another stored procedure. What is the easiest way to send these parameters to the 2nd stored procedure and to have it execute from within my calling stored procedure?
Thanks in advance for you help.
G
December 27, 2013 at 12:48 pm
The easiest way would be to do as you say, I'm not sure if there's some way around.
CREATE PROCEDURE CallingProcedure
(
@StartDate date,
@EndDate date,
@Warehouse int,
@Territory int,
@Distrib int,
@Pattern int,
@Customer int
)
AS
BEGIN
--Probably some code
EXECUTE SomeProcedure @StartDate, @EndDate, @Warehouse
--Maybe more code
END
Or maybe you didn't give enough details of your problem.
December 27, 2013 at 12:57 pm
Thank you very much, I will give that a try right now. I really appreciate your help and quick response.
G
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply