Link to home
Start Free TrialLog in
Avatar of gfedz
gfedzFlag for United States of America

asked on

SQL creating stored procedure that runs annually

I've never created a stored procedure.  I need some help on how to accomplish what I'm going for.

Basically, I need to have this procedure run every year on 09/30 at 11:59 pm.  All I want to do is this:

UPDATE tblDrivers SET intTPS = 0
UPDATE tblTPS SET intTPS = 0
ASKER CERTIFIED SOLUTION
Avatar of cojdev
cojdev
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of cfEngineers
cfEngineers

open your query window and type this

SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

CREATE PROCEDURE UpdateTPSAndDrivers
AS
BEGIN
      SET NOCOUNT ON;
      UPDATE tblDrivers SET intTPS = 0
      UPDATE tblTPS SET intTPS = 0
END
GO
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gfedz

ASKER

Thank you all for your time.