StormbringerX
Programmer
Hi all,
I'm relatively new to Stored Procedures and have a question.
I have 2 stored procedures. One replaces some data in all rows that match the criteria:
IF @NewSched > ''
BEGIN
IF @All > '' Begin
UPDATE Acreage
SET Schedule = @NewSched
WHERE Parcel = @ParcelNo
End
Else
UPDATE Acreage
SET Schedule = @NewSched
WHERE Parcel = @ParcelNo AND Schedule = @Sched
End
This works exactly as I need. I also have another stored procedure that operates on this same table on a single row basis. It recalculates a single record.
What I'm trying to accomplish is executing the second stored procedure from the first stored procedure on each row.
Looking at the above snippet, what I want to do is each time the Acreage file is updated, regardless of the number of records, I would like to execute the second SP that recalculates that particular record.
I know I can execute the SP by using sp_exec, but it seems that no matter where I place it in the above code, only the last one is recalculated.
I hope I have explained this well enough.
Thanks for your time...
Dave
I'm relatively new to Stored Procedures and have a question.
I have 2 stored procedures. One replaces some data in all rows that match the criteria:
IF @NewSched > ''
BEGIN
IF @All > '' Begin
UPDATE Acreage
SET Schedule = @NewSched
WHERE Parcel = @ParcelNo
End
Else
UPDATE Acreage
SET Schedule = @NewSched
WHERE Parcel = @ParcelNo AND Schedule = @Sched
End
This works exactly as I need. I also have another stored procedure that operates on this same table on a single row basis. It recalculates a single record.
What I'm trying to accomplish is executing the second stored procedure from the first stored procedure on each row.
Looking at the above snippet, what I want to do is each time the Acreage file is updated, regardless of the number of records, I would like to execute the second SP that recalculates that particular record.
I know I can execute the SP by using sp_exec, but it seems that no matter where I place it in the above code, only the last one is recalculated.
I hope I have explained this well enough.
Thanks for your time...
Dave