RE: Question about logic and stored procs

RE: Question about logic and stored procs

 

  

Hi Jeff,

If the previous data in the source table remains untouched after day end,
then I will go for dump every day data in contributions after 12:00 pm. This
can be plug into the schedule task easily.

In case of any exception/error you can do the task manually for the
particular day.

Regards,
Chetan

-----Original Message-----
From: Piyush Dhangar
[mailto:mssqldba-ezmlmshield-x38655046.[Email address protected]
Sent: 31 January 2007 05:20
To: LazyDBA Discussion
Subject: RE: Question about logic and stored procs

I would have created a job for this.

-----Original Message-----
From: Jeff Metcalf
[mailto:mssqldba-ezmlmshield-x33625425.[Email address protected]
Sent: Tuesday, January 30, 2007 7:40 PM
To: LazyDBA Discussion
Subject: Question about logic and stored procs


I have a large proc that loads a warehouse db every night. Right now on
the first of the month I manually run a proc to load the master tables
and I want to automate this also...it

If day(getdate())='1'
then
insert into contributions (custnmbr, periodid,year1)
select custnmbr, month(getdate()),year(getdate())
then run the rest of the procs
else if day(getdate())<>'1'
then just run the rest of the procs

Help, as always, is much appreciated.



---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html


---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html

MS Sql Server LazyDBA home page