I want to create a stored procedure that will select records meeting the required criteria, then loop though and run another stored procedure on each record individually before proceeding to the next - is this possible ?
Any help would be greatly appreciated
e.g.
CREATE PROCEDURE sp_test
as
DECLARE @sql nvarchar(4000)
SET @sql = "select * from dbo.communications where Received = 'Initiated'"
While Not @sql.EOF
exec dbo.sp_genxml
Rs.MoveNext
GO
Any help would be greatly appreciated
e.g.
CREATE PROCEDURE sp_test
as
DECLARE @sql nvarchar(4000)
SET @sql = "select * from dbo.communications where Received = 'Initiated'"
While Not @sql.EOF
exec dbo.sp_genxml
Rs.MoveNext
GO