Delete BasicPremiumAnnuity Where PlanInternalno in (758, 857) and ApplicableDate = 'Jul 29, 2025'

Declare @TargetCriteriaInternalNo int
DECLARE tmpCursor Cursor Local For
select TargetCriteriaInternalNo From TargetCriteria Where StartDate >= 'Apr 1, 2025' and TargetInternalno in (1,2,3,4) 
Open tmpCursor
Fetch tmpCursor into @TargetCriteriaInternalNo
While (@@FETCH_STATUS = 0) Begin
  Execute spdTarget @TargetCriteriaInternalNo = @TargetCriteriaInternalNo
  Fetch tmpCursor into @TargetCriteriaInternalNo
end

close tmpCursor
deallocate tmpCursor
