I have a stored procedure that is excuted from an old vb.6.0 application. I have included the stored procedure below.
Essentially the only thing this vb.6.0 code does it use some logic to create the (@FromDate) and (@ToDate) parameters. I am wanting to get rid of this old vb.6.0 code and think that this could be written more effectively within the strored procedure itself and not even pass parameters as this strored procedure is and only ever will be used for this funtion. I will post the vb.6.0 data code in my next post so that someone can help me figure out how to do this in a stored procedure. If a stored procedure is not the way..I am going to calling this stored procedure from within a DTS package..so maybe I could configure the DTS package to do this algorithm somehow as another option.
Thanks in advance!!
CREATE PROCEDURE sp_FieldActivity (@FromDate datetime, @ToDate datetime) AS
-- Delete any previous data
Exec sp_Open_Disp @FromDate, @ToDate
Exec sp_New_Disp @FromDate, @ToDate
Exec sp_Resolved_Disp @FromDate, @ToDate
Exec sp_Resolved_Grp1_Disp @FromDate, @ToDate
Exec sp_Total_Disp @FromDate, @ToDate
Exec sp_Total_Grp1_Disp @FromDate, @ToDate
Exec sp_Total_Grp1_5Days @FromDate, @ToDate
Exec sp_Total_GrpOther_5Days @FromDate, @ToDate
Exec sp_Closed_PilotInst @FromDate, @ToDate
Select * from FAR