Hi,
I am trying to write a Procedure that will return a set of ID's and then Execute another procedure based on the results
Basically I have a working procedure that archives files associated with a single Item_ID, so users can archive on a per Item basis, but I also require someway of processing all records that match an Expire Date.
I have another Procedure that can select these Expired Items and would like this to sequentially run the Archive procedure.
eg.
Execute ProcedureName Item_ID for Each Item_ID In
( Select Item_ID from Table where Expire_Date < Getdate() )
Clear as mud?
I am trying to write a Procedure that will return a set of ID's and then Execute another procedure based on the results
Basically I have a working procedure that archives files associated with a single Item_ID, so users can archive on a per Item basis, but I also require someway of processing all records that match an Expire Date.
I have another Procedure that can select these Expired Items and would like this to sequentially run the Archive procedure.
eg.
Execute ProcedureName Item_ID for Each Item_ID In
( Select Item_ID from Table where Expire_Date < Getdate() )
Clear as mud?