August 21, 2009 at 9:51 am
Hello to all.
Please, help me. I've a Job than to run to 12 pm everyday, and this JOB to contain 3 SP than depend of two parameter everyone, the IdEmpresa, and IdOficina.
How i send?
Thanks to all, and sorry my english isn't good. 😉
Luis
August 21, 2009 at 9:57 am
Hi Luis,
Can I ask how these values are set? Are they outputs of the previous procedure calls within the job.
Am I right in assuming your job is simply executing the three procedures? i.e
EXECUTE owner.ProcedureName
followed by
EXECUTE owner.ProcedureName2
and again followed by
EXECUTE owner.ProcedureName3
August 21, 2009 at 10:29 am
Of course . my JOB to accept INPUT parameters than soo are INPUT parameters of my tree SP.
Each SP is executed one after the other.
What do I do?
Thanks for helping friend
August 21, 2009 at 10:36 am
To send, more detail of my SP:
CREATE proc [dbo].[SP1]
@IdEmpresa int,
@IdOficina int,
AS
SELECT TABLE1 FROM IdEmp=@IdEmpresa and IdOfi=@IdOficina
CREATE proc [dbo].[SP2]
@IdEmpresa int,
@IdOficina int,
AS
SELECT TABLE2 FROM IdEmp=@IdEmpresa and IdOfi=@IdOficina
CREATE proc [dbo].[SP3]
@IdEmpresa int,
@IdOficina int,
AS
SELECT TABLE3 FROM IdEmp=@IdEmpresa and IdOfi=@IdOficina
I want the JOB to run for these three objects.
August 21, 2009 at 10:40 am
There may be a better way to do this but I would do something like this;
DECLARE @IdEmpresa INT,
@IdOficina INT
SELECT @IdEmpresa = code to set the value,
@IdOficina = code to set the value
EXECUTE dbo.SP1 @IdEmpresa,@IdOficina
EXECUTE dbo.SP2 @IdEmpresa,@IdOficina
Execute dbo.SP3 @IdEmpresa,@IdOficina
Hope this helps, as mentioned there maybe a better way to do it (if someone knows then let us know), but the above will work.
August 21, 2009 at 10:54 am
Thanks friend. i will do 🙂
Viewing 6 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply