Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 How to Pass Parameter Values in SQL Job Schedule?

Author  Topic 

eligiable
Starting Member

4 Posts

Posted - 2009-07-15 : 23:47:21
Please Help me Guys ...

I am facing the following problem and don't know how to get rid of ... Can AnyOne Help Me ...!

I have a few Stored Procedures, which update my Database on the Daily Basis, I just had a Problem that I want these Procedures to be run automatically through SQL Job Scheduler. There are two Param which creating me the Problem:

-- This will Complete a Day's Transactions
@sDate (Starting Date as 07/15/2009 00:00:00)
@eDate (Ending Date as 07/15/2009 23:00:00)

-- I have to pass the Date 1 Day Less from the Current Date, e.g. Today is 15 of July so I have to pass the Date as 14 of July (Requirement of the Scenario)

I just want to know that how I will be able to pass the Date values to the Param while creating SQL Server Job and it will automatically do the same for the rest of my life

Execute DisposedMOPrePhase @sDate, @YearMonth

--Please Help Me ... Thanks in Advance--

JoeNak
Constraint Violating Yak Guru

292 Posts

Posted - 2009-07-17 : 09:53:29
Declare @sDate datetime
Set @sDate = DateAdd(dd, -1, GetDate())

Exec DisposedMOPrePhase @sDate = @sDate, @YearMonth = ....
Go to Top of Page
   

- Advertisement -